Ticket #603 (closed defect: fixed)
shp2pgsql: "-w" produces invalid WKT for MULTI* objects
| Reported by: | mwtoews | Owned by: | pramsey |
|---|---|---|---|
| Priority: | medium | Milestone: | PostGIS 1.5.2 |
| Component: | postgis | Version: | trunk |
| Keywords: | shp2pgsql | Cc: |
Description
When using the "-w" option for WKT output on MULTILINESTRING/MULTIPOLYGON shapefiles, the output is invalid.
For example, using a two feature shapefile where the first is a single polygon and the second is a two-piece multipolygon:
$ 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)); ...
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

