[geos-devel] Dimension of EMPTY geoms

Mateusz Loskot mateusz at loskot.net
Mon Dec 4 13:17:33 EST 2006


strk at refractions.net wrote:
> On Mon, Dec 04, 2006 at 04:01:16PM +0100, Mateusz Loskot wrote:
>> Markus Schaber wrote:
>>> Hi, Mateusz,
>>> 
>>> Mateusz Loskot wrote:
>>>> AFAIK OGC SFS does say nothing about how to report dimension of
>>>> empty geometry.
>>>> 
>>>> OGC SFS reserves values 0, 1, and 2 for dimensions of non-empty
>>>>  geometry, so I'd suggest to use negative value.
>>> Don't confuse OGC dimension (geometrical dimensionality of the
>>> described object, Points have 0, LineStrings have 1, and Polygons
>>> have 2) and coordinate dimension (number of ordinates per vertex,
>>> which can be 2,3 or 4 in PostGIS).
>> Markus,
>> 
>> You are perfectly right! Sorry, I've read the message too fast.
> 
> No no...  Mateus was right ! Unless I've read the bug report too fast
> myself :) We're talking about OGC dimension, not coordinate dimension
> here.

Ah, now it's clear.
Thanks for confirmation.

> Using negative value will be not comfortable as we're using -1 to
> represent an exception.

I'm not sure if it's correct, but I think that as long as OGC
specification does not define a numeric value of dimension for empty
geometry, it is correct to choose any value.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net



More information about the geos-devel mailing list