Opened 12 years ago

Closed 11 years ago

Last modified 5 years ago

#878 closed enhancement (invalid)

ST_LineMerge with collection

Reported by: strk Owned by: pramsey
Priority: medium Milestone: PostGIS Fund Me
Component: postgis Version: master
Keywords: Cc:

Description (last modified by strk)

According to GEOS dox about LineMerger:

  • Any dimension of Geometry is handled.
  • The constituent linework is extracted to form the edges.

According to PostGIS manual:

Only use with MULTILINESTRING/LINESTRINGs. If you feed a polygon or geometry collection into this function, it will return an empty GEOMETRYCOLLECTION

Reality:

SELECT ST_AsText(ST_LineMerge(
'GEOMETRYCOLLECTION(
   MULTILINESTRING(
    (1656318.45 4833344.45,1656321.79 4833339.62,1656312.54 4833333.49),
    (1656312.54 4833333.49,1656309.68 4833337.07)
   ),
   LINESTRING(1656309.68 4833337.07,1656318.45 4833344.45)
)'));
                        st_astext                        
---------------------------------------------------------
 LINESTRING(1656309.68 4833337.07,1656318.45 4833344.45)
(1 row)

Basically, the MULTILINESTRING part was simply _discarded_. Works fine if the input is transformed in a MULTILINESTRING (without the collection).

Change History (5)

comment:1 by strk, 12 years ago

Bug is in GEOS: http://trac.osgeo.org/geos/ticket/401 Not sure it's a regression.

comment:2 by strk, 12 years ago

Description: modified (diff)

comment:3 by strk, 11 years ago

Milestone: PostGIS 2.0.0PostGIS Future
Type: defectenhancement

Not a bug, and not going in 2.0

comment:4 by strk, 11 years ago

Resolution: invalid
Status: newclosed

Actually, will need to be done outside of PostGIS in any case…

comment:5 by robe, 5 years ago

Milestone: PostGIS FuturePostGIS Fund Me

Milestone renamed

Note: See TracTickets for help on using tickets.