Reputation: 1203
How to cut a polygon with a line? I'm looking for an Oracle's function that can return polygons.
For example: If I have a square and a line going thru the middle, I would like to get the two polygons of the rectangles.
Looking for something like:
SELECT SDO_UTIL.SPLIT_POLYGON(POLYGON, LINE) FROM DUAL
Result can be wkt or an oracle geometry:
POLYGON ((-71.123456 45.123456, ....))
POLYGON ((-72.123456 46.123456, ....))
Upvotes: 2
Views: 518
Reputation: 146
I just recently came across this question. Here you can find a script, written by Dan Geringer, that splits a polygon into 2 separate polygons using a simple line geometry (containing 2 vertices). I have tested the script using several polygons including polygons with holes, and multi-polygons. The test environment was an Autonomous Database 19c containing sample admin boundaries (polygons) for Germany.
Upvotes: 0