Opened 4 years ago

Closed 4 years ago

#4784 closed enhancement (fixed)

ST_CollectionExtract extracts highest coordinate dimension by default

Reported by: pramsey Owned by: pramsey
Priority: medium Milestone: PostGIS 3.1.0
Component: postgis Version: master
Keywords: Cc:

Description

Add in a one-parameter mode where

ST_COLLECTIONEXTRACT('GEOMETRYCOLLECTION(LINESTRING, POINT))')

returns a multi-linestring. Basically the component of highest coordinate dimension is returned when the function is called without a specific return type.

Change History (1)

comment:1 by Paul Ramsey <pramsey@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In 6812b00/git:

Add ST_CollectionExtract(geometry)
with a behaviour of extracting
the primitive geometry (point/line/poly) with the highest coordinate
dimension. So a collection of lines and polys will result in a
multipoly output. A collection of lines and points will result in a
multiline output.
Closes #4784

Note: See TracTickets for help on using tickets.