[postgis-tickets] [PostGIS] #3172: ST_AddMeasure refuses to set measure of zero-length line
PostGIS
trac at osgeo.org
Thu Jun 18 09:54:45 PDT 2015
#3172: ST_AddMeasure refuses to set measure of zero-length line
-------------------------+---------------------------
Reporter: strk | Owner: pramsey
Type: enhancement | Status: new
Priority: medium | Milestone: PostGIS 2.2.0
Component: postgis | Version: 2.1.x
Keywords: |
-------------------------+---------------------------
In modeling the trajectory of a non-moving object it is useful to be able
to create a LINESTRING with 2 vertices that have the same XYZ portion but
different M. Using ST_AddMeasure on such a topologically invalid input
results in the M being set to 0 in both first and second (last) vertex:
{{{
=# select ST_AsText(ST_AddMeasure('LINESTRING(0 0,0 0)', 1, 2));
st_astext
----------------------------
LINESTRING M (0 0 0,0 0 0)
(1 row)
=# select ST_AsText(ST_AddMeasure('LINESTRING(0 0,1 0)', 1, 2));
st_astext
----------------------------
LINESTRING M (0 0 1,1 0 2)
(1 row)
}}}
I think it would be nice for the first case to return
{{{
LINESTRING M (0 0 1,0 0 2)
}}}
I know, it's a very special case, but it seems to be well defined.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3172>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list