Martin Davis wrote: > Yes. The spec doesn't cover this, but I chose to use an empty > GeometryCollection as a "typeless" empty geometry, for methods which > need to return one. The createEmptyGeometry method is just a > convenience method for this convention.
OK, I understant it. > Anyway, what else could that method return that would make sense > (given that it has no type information)? It depends on the idea behind "empty geometry" or "null geometry" [1]. As I know, OGC Simple Feature Spec. explains that empty geometry represents empty point set (empty set of coordinates). According to my understanding: Point is empty if it contains "uninitialized" coordinates MultiPoint is empty if it contains no points in its set. etc. There is also a distinction between empty and null. NULL means something undefined, uninitialized - something unsafe. EMPTY means something well constructor but with empty set of points. In some case, NULL object can be compared to EMPTY object with true result. So, I think isEmpty() function should check the state of the coordinates set of Geometry return appropriate value (true/false). [1] Saying "null geometry" I think about logical meaning but not the physical representation of instance of geometry: null reference/null pointer. Cheers -- Mateusz Łoskot http://mateusz.loskot.net _______________________________________________ geos-devel mailing list geos-devel@geos.refractions.net http://geos.refractions.net/mailman/listinfo/geos-devel