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

Kevin Neufeld kneufeld at refractions.net
Wed Feb 17 11:33:22 PST 2010


On 2/17/2010 10:40 AM, Paul Ramsey wrote:
> Better to accept invalidity in
> all its flavors and provide the tools to identify and work on
> improving it inside the database.
>

I'm torn.  I totally agree that PostGIS needs to accept invalid geometries for all the reasons Chris and Paul gave.  But 
I'm kinda with Mark on this one - there is a difference between geometry invalidity and what constitutes a geometry in 
the first place.  Shouldn't a POLYGON at least look something like a POLYGON before being allowed into PostGIS? 
Obviously in this case, it makes most sense to automatically add any missing closing-ring points.  But what if the 
polygon only has one point (ie. 'POLYGON((0 1))')?

On the other hand, such a case is actually valid according to the WKT grammar specification in 3.2.5.2 in SFS 1.1. 
Maybe that should be the minimum requirements ... the geometries have to at least comply with the standard.  (ie. single 
ordinate lines and polygons are permitted, but multi-ordinate points are not)

-- Kevin



More information about the postgis-devel mailing list