[postgis-users] Suspect shape(s) -- multipolygons and large loadfiles

Gregory S. Williamson gsw at globexplorer.com
Tue Oct 28 00:23:36 PST 2003


I acquired the latest and greatest cvs version (as of about 16:00 today, Pacific time) and tada! it correctly parsed my earlier troublesome multiploygon geometry. Thanks for the hint!

However, in the "no good deed goes unpunished" category, I have another troublesome shape from the same table, a polygon (attached as a text file). It has 464 points; JUMP tells me it is a "self intersection" and returns it as an "L" shape.

This is what the shape2pgsql generated:

Insert into sid_content_cust2 (gid,TRACKING_ID,P_DISK_ID,P_MACHINE,B_DISK_ID,B_MACHINE,STACKING_OR,P_DIRECTORY,B_DIRECTORY,FILENAME,PROJ_KEY,COPYRIGHT,the_geom) values('212528','111111','11','aserver','1','aserver','2227','/directory/','/directory','5m_st_tropez.sid','French_Lambert_II_Etendu','1',GeometryFromText('MULTIPOLYGON()',4326) );

This gets:
psql:xab:30: ERROR:  couldnt parse objects in GEOMETRY

(natch)

This shape may violate some rule -- Informix seems to cope with it; JUMP doesn't; won't be able to try ARC stuff until tomorrow.

Any (further) advice would be welcome !

Thanks,

Greg Williamson
DBA
GlobeXplorer LLC


-----Original Message-----
From:	strk [mailto:strk at keybit.net]
Sent:	Mon 10/27/2003 2:09 AM
To:	PostGIS Users Discussion
Cc:	
Subject:	Re: [postgis-users] Suspect shape(s) -- multipolygons and large loadfiles

What version of shp2pgsql are you using ?
There have been changes in the loader, try latest CVS
and see what happens.

--strk

gsw wrote:
> Dear peoples,
> 
> I've got to move several dozen tables of varying size (a few hundred to about 500,000 rows per table) of spatial data from Informix' spatial blade into postgres postgis. The data is well-behaved by Informix' standards. I unload using the unloadshp Informix utility which gives me shape files; I then process those with the postgres' shp2psql utility and then run the resulting sql file.
> 
> In one file I process some 63097 records and then I get an error:
> 
> psql:sid_content.sql:63353: ERROR:  couldnt parse objects in GEOMETRY
> 
> The offending WKT is attached. I did a bit of cut-and-paste and tried it in the JUMP platform and I get a warning (?) in the status bar of that tool saying "Ring Self-Intersection" ... the shape seemed to be functional enough that this tool could display it.
> 
> So a couple of questions come to mind:
> a) what might be done about this ? (its a shape of an image file so there may limits in editing it but perhaps tweaks could be made).
> 
> b) to find this offending record was tedious -- i ended up running the sql file with a "psql -s -f sid_content.sql" option and stepping through the 63k records. Any suggestions for a more painless method of finding offending records would be welcome. Although some largish tables have loaded without error, others have not.
> 
> Thanks for any advice !
> 
> Greg Williamson
> DBA
> GlobeXplorer LLC
> 
> 


> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users


_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users





-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: a_big_poly.txt
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20031028/83c531e3/attachment.txt>


More information about the postgis-users mailing list