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

Paul Ramsey pramsey at refractions.net
Tue Oct 28 07:59:06 PST 2003


Make us a shape file with just that geometry in it, and we might be  
able to find out what is wrong (my money is on it being a completely  
bogus deviation from the published standard :)
P.

On Tuesday, October 28, 2003, at 12:23 AM, Gregory S. Williamson wrote:

> 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',GeometryFr 
> omText('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
>
>
>
>
>
> <a_big_poly.txt>_______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
      Paul Ramsey
      Refractions Research
      Email: pramsey at refractions.net
      Phone: (250) 885-0632




More information about the postgis-users mailing list