[geos-devel] [GEOS] #1079: Inconsistent dimensionality change
GEOS
geos-trac at osgeo.org
Mon Nov 30 12:11:02 PST 2020
#1079: Inconsistent dimensionality change
------------------------+--------------------------
Reporter: Mike Taves | Owner: geos-devel@…
Type: defect | Status: new
Priority: minor | Milestone: 3.9.0
Component: Default | Version: master
Severity: Annoyance | Keywords:
------------------------+--------------------------
Over in Shapely, there is a test suite
[https://github.com/Toblerity/Shapely/blob/b2b536004ee6b8316fffcee36ff8e1e65be71958/tests/test_create_inconsistent_dimensionality.py
test_create_inconsistent_dimensionality.py] that checks WKT with
inconsistent dimensionality. For most instances, a geometry with at least
one 3D coordinate is promoted with a Z dimension, assuming Z=0 for other
XY coordinates. There are a few isolated cases where the geometry remains
as a 2D geometry if the 3D coordinate is not the first.
Of these inconsistencies, one new inconsistency stands out as new and
unusual.
GEOS 3.8.1 and earlier:
{{{
# preserve 3rd dimension
LINESTRING (1 1 1, 2 2) -> LINESTRING Z (1 1 1, 2 2 0)
# drop 3rd dimension
LINESTRING (1 1, 2 2 2) -> LINESTRING (1 1, 2 2)
}}}
Since GEOS 3.9.0beta1:
{{{
# drop 3rd dimension
LINESTRING (1 1 1, 2 2) -> LINESTRING (1 1, 2 2)
# preserve 3rd dimension
LINESTRING (1 1, 2 2 2) -> LINESTRING Z (1 1 0, 2 2 2)
}}}
why is this the only geometry type scenario that swaps behaviour? Ideally
any geometry with at lest one 3D coordinate would be promoted with a Z
dimension.
--
Ticket URL: <https://trac.osgeo.org/geos/ticket/1079>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
More information about the geos-devel
mailing list