[postgis-devel] [PostGIS] #603: shp2pgsql: "-w" produces invalid WKT for MULTI* objects

PostGIS trac at osgeo.org
Sat Sep 18 23:27:29 PDT 2010


#603: shp2pgsql: "-w" produces invalid WKT for MULTI* objects
-----------------------+----------------------------------------------------
 Reporter:  mwtoews    |       Owner:  pramsey      
     Type:  defect     |      Status:  new          
 Priority:  medium     |   Milestone:  PostGIS 2.0.0
Component:  postgis    |     Version:  trunk        
 Keywords:  shp2pgsql  |  
-----------------------+----------------------------------------------------
 When using the "-w" option for WKT output on MULTILINESTRING/MULTIPOLYGON
 shapefiles, the output is invalid.[[BR]]
 For example, using a two feature shapefile where the first is a single
 polygon and the second is a two-piece multipolygon:
 {{{
 #!sql
 $ shp2pgsql -s 4326 -w foopoly.shp
 Shapefile type: Polygon
 Postgis type: MULTIPOLYGON[2]
 ...
 INSERT INTO "foopoly" ("fooname",the_geom) VALUES
 ('triangle',GeomFromText('SRID=4326;MULTIPOLYGON(SRID=4326;((-0.573744292237443
 0.445890410958904,-0.436301369863014 0.257305936073059,-0.660045662100457
 0.209360730593607,-0.573744292237443 0.445890410958904)))', 4326));
 INSERT INTO "foopoly" ("fooname",the_geom) VALUES ('split
 shape',GeomFromText('SRID=4326;MULTIPOLYGON(SRID=4326;((-0.100684931506849
 0.365981735159817,-0.0335616438356166 0.199771689497717,-0.209360730593607
 0.225342465753425,-0.100684931506849
 0.365981735159817)),SRID=4326;((-0.212557077625571
 0.190182648401827,-0.0367579908675799 0.161415525114155,-0.167808219178082
 0.0463470319634702,-0.212557077625571 0.190182648401827)))', 4326));
 ...
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/603>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list