#3845 closed enhancement (fixed)
ST_LocateAlong returns error on poorly measured LRS data
Reported by: | pauldzy | Owned by: | pramsey |
---|---|---|---|
Priority: | low | Milestone: | PostGIS 2.3.4 |
Component: | postgis | Version: | 2.3.x |
Keywords: | ST_LocateAlong LRS | Cc: |
Description (last modified by )
I have an LRS geometry from the USGS NHD dataset whereby the final two points of the line have the same measure values for unknown reasons.
This is incorrect of course but not overly invalid. When running ST_LocateAlong against that final measure I get
ERROR: Zero measure-length line encountered! SQL state: XX000
Ideally I would prefer a more forgiving logic, perhaps return NULL if we consider this line truly invalid or perhaps just look past the duplicate measure to return results. I suppose this could be tied as well to the lack of an LRS geometry validator in PostGIS.
Thanks, Paul
SELECT ST_LocateAlong( ST_GeomFromEWKT('SRID=5070;LINESTRINGM(460845.826402341 773926.724512888 46.31061,460836.315093686 773887.969539204 45.72465,460815.740949801 773767.245317281 43.92644,460817.438766447 773729.386836077 43.37001,460817.438778068 773729.386605209 43.37001)') ,43.37001 )
Change History (4)
comment:1 by , 7 years ago
Description: | modified (diff) |
---|
comment:2 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
In 15871: