The only valid EMPTY geometry would be a GEOMETRYCOLLECTION. All other possibilities should be avoided IMO.
--strk; On Thu, Mar 30, 2006 at 08:52:06AM -0800, Martin Davis wrote: > But the definition of LinearRing is that the start point equals the end > point. This makes the test unnecessary for a valid LinearRing. However, > maybe it's more general to use the explicit test. > > As for an empty LinearRing, well, I don't know of any semantics which covers > this. This might be an angels-on-the-head-of-a-pin kind of thing. If you > don't like the JTS semantics for your particular use-case, you should just > implement your own 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: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of > > Mateusz Loskot > > Sent: March 30, 2006 6:25 AM > > To: GEOS Development List > > Subject: [geos-devel] Is empty LinearRing closed? > > > > > > Hi, > > > > As I see, LinearRing is always closed: > > > > bool LinearRing::isClosed() const { > > return true; > > } > > > > GeometryFactory ::createLinearRing() call creates empty > > LinerRing. So, should it be considered as closed by default? > > > > IMO empty LinearRing should not be considered as closed. OGC > > Simple Feature Spec. says about IsClosed for Curve type (base > > of LinearRing): > > > > IsClosed( ): > > (TRUE) if this Curve is closed (StartPoint ( ) = EndPoint ( )). > > > > > > So, according to OGC SF Spec. LinearRing::isClosed() should > > be implemented as follows; > > > > bool LinearRing::isClosed() const { > > return (getStartPoint() == getEndPoint()); > > } > > > > Am I correct? > > > > Cheers > > -- > > Mateusz £oskot > > http://mateusz.loskot.net > > _______________________________________________ > > geos-devel mailing list > > geos-devel@geos.refractions.net > > http://geos.refractions.net/mailman/listinfo/geos-devel > > > _______________________________________________ > geos-devel mailing list > geos-devel@geos.refractions.net > http://geos.refractions.net/mailman/listinfo/geos-devel -- /"\ ASCII Ribbon Campaign \ / Respect for low technology. X Keep e-mail messages readable by any computer system. / \ Keep it ASCII. _______________________________________________ geos-devel mailing list geos-devel@geos.refractions.net http://geos.refractions.net/mailman/listinfo/geos-devel