[postgis-devel] NULL geometries (was: lwgeom parser robustness and niceness)

strk strk at keybit.net
Mon Jun 7 09:03:37 PDT 2004


On Mon, Jun 07, 2004 at 11:53:03AM -0400, Carl Anderson wrote:
> strk wrote:
> 
> >Carl, you were right, it was the error function ....
> >I've fixed it. Now you get ERRORs instead of traps.
> >
> >Also, I've unleashed the parser to accept miXeD case.
> >
> >A rimaning issue is about wheter to accept (MULTI)POINT(),
> >(MULTI)LINESTRING(), (MULTI)POLYGON(), GEOMETRYCOLLECTION()
> >as empty geometries... I think that would be nice, are there
> >comments ?
> >
> 
> I am against it becuase it would tend to create in users minds the 
> concept of a finer grain of null geometry
> 
> sort of a null point vs a null polygon vs ...
> when really there exists only a null geometry super class
> 

Currently postgis supports (geometry and lwgeom):
	POINT(EMPTY)
	MULTIPOINT(EMPTY)
	LINESTRING(EMPTY)
	MULTILINESTRING(EMPTY)
	POLYGON(EMPTY)
	MULTIPOLYGON(EMPTY)
	GEOMETRYCOLLECTION(EMPTY)

Do you think it should drop all but last form support ?

Another note: table constraints added by AddGeometryColumn never
allow the NULL geometry to be inserted, as the check goes:

  ((geometrytype(the_geom) = '<type>'::text) OR (the_geom IS NULL))

Maybe we should add an isnullgeom(geometry) returning true for
NULL and GEOMETRYCOLLECTION(EMPTY).

comments ?

--strk;

> 
> 
> 
> -- 
> Carl Anderson
> GIS Manager, Fulton County E&CD
> 404.730.8026
> carl.anderson at co.fulton.ga.us
> 
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel



More information about the postgis-devel mailing list