[postgis-devel] Call for 1.4.2 and 1.5.1 (Handling of Invalid Geometries)

strk strk at keybit.net
Wed Feb 24 09:18:35 PST 2010


On Tue, Feb 23, 2010 at 12:46:12PM +0000, Mark Cave-Ayland wrote:

> It seems that strk has done a good job with his geometry cleaning 
> function. I would like to move forward as was discussed at last year's 
> Code Sprint, i.e. move the majority of functionality into liblwgeom.
> 
> With this in place, we could then alter shp2pgsql to add an extra 
> --force parameter (or similar) that would invoke ST_MakeValid() for 
> invalid geometries it found on import. This would give us the best of 
> both worlds: we ensure that anything new going into the database is 
> valid, whilst also allowing tidy up on import of structurally invalid 
> data with associated warnings to the user.

Mmm, I'm not convinced about this.
The ST_MakeValid function easily returns GEOMETRYCOLLECTION in its attempt
to keep all points. This mean the geometries will not be accepted in a table
crated with ST_AddGeometryColumn because that call will enforce a constraint
on geometry type.

--strk; 

  ()   Free GIS & Flash consultant/developer
  /\   http://foo.keybit.net/~strk/services.html



More information about the postgis-devel mailing list