Hi,

2013/7/25 Mateusz Loskot <mateusz@loskot.net>
On 25 July 2013 02:41, Adam Wulkiewicz <adam.wulkiewicz@gmail.com> wrote:
>
> 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
related to
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
specified:

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)


According to this, the empty geometry is useful in cases where the result of the operation isn't any geometry. Our dimensions are static and we handle those cases in a different way, so we probably wouldn't need to use the empty geometry. However we probably shouldn't assume that we won't, especially with Boost.Variant on the horizon.

So should we leave it as it is and assume that dimension may be signed or unsigned? It shouldn't be a problem to add empty geometries in the future, even if core_traits were using size_t and the user were using some signed int of different size.

Regards,
Adam