Opened 9 years ago
Closed 9 years ago
#3172 closed enhancement (fixed)
ST_AddMeasure refuses to set measure of zero-length line
Reported by: | strk | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.2.0 |
Component: | postgis | Version: | master |
Keywords: | Cc: |
Description
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.
Change History (2)
comment:1 by , 9 years ago
Version: | 2.1.x → trunk |
---|
comment:2 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Fixed at r13830