[postgis-devel] [PostGIS] #859: shp2pgsql new option to do something with bad geometries.

PostGIS trac at osgeo.org
Wed Mar 16 06:40:27 PDT 2011


#859: shp2pgsql new option to do something with bad geometries.
-------------------------+--------------------------------------------------
 Reporter:  jadams       |       Owner:  pramsey      
     Type:  enhancement  |      Status:  new          
 Priority:  low          |   Milestone:  PostGIS 2.0.0
Component:  postgis      |     Version:  1.5.X        
 Keywords:               |  
-------------------------+--------------------------------------------------
 Ticket 110 included a discussion of what to do with invalid geometries on
 load.  I'm splitting that out into its own ticket, since it wasn't
 directly related to 110 (which was about transactions).  Here are the most
 relavent excerpts:

 by robe:
 "...also have the option to NULL the geometry. I think others have asked
 for the ability to NULL.

 Its a reality we get bad data and the last set I had to deal with was
 intentionally bad. They had used the same malformed geometry to represent
 the absense of a geometry -- presumably to satisfy ESRI shapefile that
 requires a geometry for all records.

 After trying to salvage these things -- closing them and so forth -- to my
 shock they were all the same malformed creatures."

 by bobdebm:
 "I was just wondering if there could be an option in shp2pgsql that puts
 all of the 'not isvalid(the_geom)' geometries in a same named table with a
 '_err' suffix?"

 by robe:
 "I like Bob's idea of throwing in an error table or giving the option to
 do so though as you said we can't do a true st_isvalid check.

 I think the fact there is no GEOS binding is fine. The main issue to me is
 that these are just thrown out and are therefore hard to repair since its
 easier to repair things in the db - if we could even throw just the WKT in
 the table that would be better than nothing."

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/859>
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