[geos-devel] Is empty LinearRing closed?

Martin Davis mbdavis at VividSolutions.com
Fri Mar 31 12:01:01 EST 2006


This is uneccessary - there is already a perfectly well defined way of representing emptiness for every Geometry class.  And this is simple to test.

Martin Davis, Senior Technical Architect
Vivid Solutions Inc.      www.vividsolutions.com
Suite #1A-2328 Government Street Victoria, B.C. V8T 5G5
Phone: (250) 385 6040 - Local 308 Fax: (250) 385 6046


> -----Original Message-----
> From: geos-devel-bounces at geos.refractions.net 
> [mailto:geos-devel-bounces at geos.refractions.net] On Behalf Of 
> Mateusz Loskot
> Sent: March 31, 2006 12:03 AM
> To: GEOS Development List
> Subject: Re: [geos-devel] Is empty LinearRing closed?
> 
> 
> strk at refractions.net wrote:
> > On Thu, Mar 30, 2006 at 02:42:19PM -0800, Martin Davis wrote:
> >> I'm not sure why strk is making this comment.  JTS/GEOS supports
> >> empty geometries of all types (as per the OGC SFS).
> > 
> > I'm a bit PostGIS oriented. There's no support for EMPTY 
> whatever in  
> > PostGIS except GEOMETRYCOLLECTION. As always I'd follow 
> JTS, so if the 
> > plan is to support any kind of empty geom we should drop the
> > ::createEmptyGeometry() and ensure no memory violation is triggered
> > by EMPTY types *and* results are semantically correct.
> 
> Hi,
> 
> Another idea, possible and simple way to handle empty 
> geometries would be to add a boolean flag to the Geometry 
> class - bool empty;
> 
> Then, if this flag is set, the geometry is empty.
> 
> Drawback:
> This approach requires to keep this flag synchronized with 
> state of geometry to avoid situation when geometry is a 
> non-empty set of points but the empty flag is set to true ;-)
> 
> Cheers
> -- 
> Mateusz Łoskot
> http://mateusz.loskot.net 
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net 
> http://geos.refractions.net/mailman/listinfo/geos-devel
> 



More information about the geos-devel mailing list