[PostGIS] #5685: ST_Node('LINESTRING(0 0, 0 0)') returns GEOMETRYCOLLECTION EMPTY
PostGIS
trac at osgeo.org
Wed Mar 6 00:11:43 PST 2024
#5685: ST_Node('LINESTRING(0 0,0 0)') returns GEOMETRYCOLLECTION EMPTY
----------------------+---------------------------
Reporter: strk | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 3.5.0
Component: postgis | Version: master
Resolution: | Keywords:
----------------------+---------------------------
Comment (by strk):
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)
}}}
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5685#comment:4>
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