[postgis-users] need help; A shp2pgsql bug?

Fay Du fay.du at versaterm.com
Thu Jul 6 07:32:54 PDT 2006

Hi list:
I have a street center line shape file (I cut the error area into a
small file and put in attachment). For one street, there are two
segments (it should be one), one on the top of another. When I use
shp2pgsql, one is loaded into to the table in PostGIS correctly, another
one does not. The second road segment is loaded into PostGIS table as 2
rows, and none of them is right. Why? Is it a shp2pgsql bug? How can I
avoid it?
After I load the file, I checked the 2 rows
select astext(the_geom) from st_centerline 
where gid = 6605 or gid = 25113 or gid = 29190;   
 (they are same, one on another's top, and orginal file has 2 segment.)
"MULTILINESTRING((335670.595996869 5040033.68488063,335723.599695015
"MULTILINESTRING((335670.595996869 5040033.68488063,167861.8 0))"
"MULTILINESTRING((167861.8 0,335723.599695015 5040081.67951423))"
I noticed that the last 2 geometry is separate at point (167861.8 0).
They should be one geometry feature. How it happened? I have 6 errors
like this when I run shp2pgsql. Total feature (road segment) in the
original shape file is 28541.
 It does not look like original data problem.  I use Universal
Translator in MapInfo to import the same shape file into MapInfo tab
file, both road segments were successfully import into tab file. The
above 2 road segments are still overlap in tab file.
Any help will be appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20060706/1b539957/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shp2pg_err.zip
Type: application/octet-stream
Size: 1463 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20060706/1b539957/attachment.obj>

More information about the postgis-users mailing list