Subject: Re: [geometry] dimension type of geometries
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2013-07-25 07:58:18
On 25 July 2013 02:41, Adam Wulkiewicz <adam.wulkiewicz_at_[hidden]> wrote:
> 2013/7/23 Barend Gehrels <barend_at_[hidden]>
>> About size_t, I don't see the need to change behaviour w.r.t. other
>> libraries if it was consistent between them before. Also OGC (our reference)
>> defines Dimension as integer (probably because they have a general interface
>> and do not have size_t).
> Does OGC allow negative dimensions? If not, should we assume that they won't
> be used in the future?
In OGC (and ISO too) specifications of Simple Features, all attributes
geometric dimensions are defined using signed integer.
In SQL/MM Spatial, an extension or predecessor of the latest OGC/ISO specs,
there is notion of ST_PrivateDimension for which the following rule is
a) If the ST_Geometry value corresponds to the empty set, then the
dimension is -1.
So, I'd draw conclusion, that OGC/ISO at least do not disallow
negative values here.
Behaviour of empty geometry vs empty set as in set theory might be confusing
(some details here http://trac.osgeo.org/postgis/wiki/DevWikiEmptyGeometry)
-- Mateusz Loskot, http://mateusz.loskot.net
Geometry list run by mateusz at loskot.net