Opened 10 years ago

Closed 7 years ago

Last modified 7 years ago

#3097 closed enhancement (fixed)

ST_Split using MULTILINESTRING blade

Reported by: mwtoews Owned by: strk
Priority: medium Milestone: PostGIS 2.2.7
Component: postgis Version: master
Keywords: Cc:

Description

Attempting to split a POLYGON with a MULTILINESTRING in PostGIS 2.1 yields an error:

SELECT ST_AsText(ST_Split(poly, blade))
FROM (
  SELECT
    'POLYGON((20 30, 100 180, 160 20, 20 30),(70 70, 92 105, 110 50, 70 70))'::geometry poly,
    'MULTILINESTRING((150 90, 90 70, 60 20),(50 140, 90 70))'::geometry blade
) f;

ERROR:  Splitting a Polygon by a MultiLineString is unsupported

This enhancement is to allow ST_Split to allow a MULTILINESTRING as a blade.

See UsersWikiSplitPolygonWithLineString for a ST_SplitPolygon which can complete the above example as expected.

Change History (11)

comment:1 by pramsey, 10 years ago

Milestone: PostGIS 2.2.0PostGIS Future

comment:2 by strk, 9 years ago

Owner: changed from pramsey to strk
Status: newassigned

comment:3 by strk, 9 years ago

Milestone: PostGIS FuturePostGIS 2.2.0
Resolution: fixed
Status: assignedclosed

Implemented with r13433, thanks Regione Toscana!

comment:4 by WS90, 7 years ago

Resolution: fixed
Status: closedreopened

Hello,

I'm working on Postgis "2.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1" and when I execute the following request :

SELECT ST_AsText(ST_Split(poly, blade))
FROM (
  SELECT
    'POLYGON((20 30, 100 180, 160 20, 20 30),(70 70, 92 105, 110 50, 70 70))'::geometry poly,
    'MULTILINESTRING((150 90, 90 70, 60 20),(50 140, 90 70))'::geometry blade
) f;

I get the error : "Splitting a Polygon by a MultiLineString is unsupported"

comment:5 by pramsey, 7 years ago

Confirmed on trunk as well. The referenced patch covered a number of cases, but not the case in this actual ticket.

comment:6 by pramsey, 7 years ago

Milestone: PostGIS 2.2.0PostGIS 2.2.7

comment:7 by pramsey, 7 years ago

In 16127:

Allow multi-linestring to be used as blade in line/poly splitting,
References #3097

comment:8 by pramsey, 7 years ago

Resolution: fixed
Status: reopenedclosed

comment:9 by robe, 7 years ago

Resolution: fixed
Status: closedreopened

pramsey sorry to be such a nag.

Don't forget the NEWS item and Enhanced: note in docs. I reopened ticket for that cause I'm so petty.

comment:10 by pramsey, 7 years ago

Resolution: fixed
Status: reopenedclosed

In 16128:

Doco on "enhancement" per robe, closes #3097

comment:11 by pramsey, 7 years ago

In 16129:

Clarify docs, References #3097

Note: See TracTickets for help on using tickets.