[postgis-devel] [PostGIS] #603: shp2pgsql: "-w" produces invalid WKT for MULTI* objects
PostGIS
trac at osgeo.org
Sun Sep 19 09:45:05 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 |
-----------------------+----------------------------------------------------
Comment(by mwtoews):
The patch works to produce usable SQL that is successfully loaded into
postgres.
{{{
#!sql
INSERT INTO "foopoly" ("fooname",the_geom) VALUES
('triangle',GeomFromText('SRID=26910;MULTIPOLYGON(((-0.573744292237443
0.445890410958904,-0.436301369863014 0.257305936073059,-0.660045662100457
0.209360730593607,-0.573744292237443 0.445890410958904)))', 26910));
INSERT INTO "foopoly" ("fooname",the_geom) VALUES ('split
shape',GeomFromText('SRID=26910;MULTIPOLYGON(((-0.100684931506849
0.365981735159817,-0.0335616438356166 0.199771689497717,-0.209360730593607
0.225342465753425,-0.100684931506849
0.365981735159817)),((-0.212557077625571
0.190182648401827,-0.0367579908675799 0.161415525114155,-0.167808219178082
0.0463470319634702,-0.212557077625571 0.190182648401827)))', 26910));
}}}
However I get this warning for each feature (twice for :
{{{
WARNING: OGC WKT expected, EWKT provided - use GeomFromEWKT() for this
}}}
I think a better patch would set SRID = -1 for all geometries (not just
inner). But a warning is fine at this stage.
Regarding the future of this feature: I don't rely on it, but I've found
it helpful for some debugging. I won't miss it if it is removed for v2.0.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/603#comment:5>
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