[postgis-devel] [PostGIS] #198: shp2pgsql gives bad output on bad input

PostGIS trac at osgeo.org
Thu Jun 18 03:29:19 PDT 2009


#198: shp2pgsql gives bad output on bad input
----------------------+-----------------------------------------------------
  Reporter:  pramsey  |       Owner:  mcayland     
      Type:  defect   |      Status:  new          
  Priority:  medium   |   Milestone:  postgis 1.4.0
 Component:  postgis  |     Version:  trunk        
Resolution:           |    Keywords:               
----------------------+-----------------------------------------------------
Comment (by robe):

 Mark,

 Haven't had time to test this yet.  Though looking at it seems like a
 shame to throw away all that work. Well not throw away but not use it.

 I'm still all for a switch and ideally the switch would work something
 like this

 value: 0 (or not specified - same behavior as 1.3.6)
 value: 1 (the behavior you have currently - just break at first bad)
 value: 2 (throw out bad entries) (not sure if this would be possible but
 would solve most of my problems -- check but either remark out the bad
 lines in the generated SQL or put an error on the screen to alert of the
 bad geometry and leave it out of the generated sql).


 The main issue I have is I have lets say 1,000,000 buildings to load in
 and if I've got a couple of buildings with not enough points to form a
 polygon -- I'm not going to waste time sitting around trying to figure out
 what they meant by a 2-sided polygon.  And its a pain to get rid of begin
 commits.  But its still good to know which records will not come thru in
 which case I can fudge it and just put in a NULL for the geometry or
 something.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/198#comment:5>
PostGIS <http://trac.osgeo.org/postgis/>
PostGIS


More information about the postgis-devel mailing list