Opened 9 months ago
Closed 9 months ago
#5685 closed defect (fixed)
ST_Node('LINESTRING(0 0,0 0)') returns GEOMETRYCOLLECTION EMPTY
Reported by: | strk | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 3.5.0 |
Component: | postgis | Version: | master |
Keywords: | Cc: |
Description
The GEOS counterpart of noding would return the input line untouched:
$ geosop node -a 'LINESTRING(0 0,0 0)' MULTILINESTRING ((0 0, 0 0))
We must be turning to EMPTY on later steps (linemerge?)
Change History (6)
comment:1 by , 9 months ago
comment:4 by , 9 months ago
Commit [8bfdce1c8577ccec4fe870c9a35c196b7dffe24c/git] fixed this specific case but single-vertex lines are still turned into empty if they are a component of a multilinestring. Even if the single-vertex line would split another line:
strk=# select st_astext(st_node('MULTILINESTRING((5 0,5 0),(20 0,10 0))')); st_astext ----------------------- LINESTRING(20 0,10 0) (1 row)
It doesn't seem correct
Note that the underlying GEOSNode does not even touch the input:
DEBUG: [lwgeom_geos_node.c:lwgeom_node:167] Noded (GEOS): MULTILINESTRING ((5 0, 5 0), (20 0, 10 0)) DEBUG: [lwgeom_geos_node.c:lwgeom_node:179] LineMerged (GEOS): LINESTRING (20 0, 10 0)
comment:5 by , 9 months ago
Owner: | changed from | to
---|
comment:6 by , 9 months ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Declaring closed for now. The single collapsed line case is fixed.
Note:
See TracTickets
for help on using tickets.
Confirmed it is the LineMerge step that turns the single-vertex line into an empty. It is fixed by PR https://git.osgeo.org/gitea/postgis/postgis/pulls/183