I would like to know if it's possible to intersect feature datasets (multipolygon, polygon, multilinestring and linestring) to get a result as a set of linestrings being split at each intersection point.
Output should give:
- 4 linestrings for the square
- 3 linestrings for the line
- 2 linestrings for the polygon
Best Answer
First, for polygons, you want the outer boundary of the polygon as a line using
ST_Boundary
. Then you want a combination ofST_Intersection
andST_SymDifference
So something like (untested):