[postgis-users] shp2pgsql bug?

Eric Lam elam at lisasoft.com
Thu Jun 15 22:53:18 PDT 2006


Hello list,

I am back porting geometries I have loaded in postgresql8.x with postgis 
1.x to a postgresql 7.4.x with postgis 0.8.x

I am doing a:
pgsql2shp -f tmp.shp -g the_geom data MLSTable
shp2pgsql -s 4283 -c -g the_geom -w tmp.shp MLSTable > table.sql

All geometries are multilinestrings. However up until recently, I have 
only ever had 1 linestring in the multilinestring.
For geometries with more than 1 linestring in the multilinestring there 
is a comma at the start of every extra linestring except the first.
eg MULTILINESTRING( (12 34, 23 34, 14 51),(,25 43,34 23,34 54),(,76 
45,34 23))

Is this a known problem? Is there something I am missing?

At the moment I have piped the file through sed to remove the extra 
comma before loading into the older database.
This is loading fine, however ....

regards
Eric Lam