Questions tagged [st-split]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
1 answer
53 views

Custom ST_MultiSplit PostgreSQL function error, to split one layer with another

I have a lines layer which I would like to split with a points layer. I first created the a ST_MultiSplit function: CREATE OR REPLACE FUNCTION ST_MultiSplit(geom Geometry, blades Geometry) RETURNS ...
  • 75
2 votes
1 answer
87 views

ST_Split only on blade

If the geometry input (a line string in my case) crosses over itself, ST_Split is splitting on the crossover as well as the blade. Is that the expected case / is it possible to only split on the blade?...
  • 21
5 votes
2 answers
115 views

St_Split not split line by point

I want to split a line by point in postgis. But the result is whole line without splitting. I work with closest point on input line. This is my query: select st_split( _input, ...
6 votes
2 answers
316 views

Splitting lines by multiple polygons, taking length of particular segment, using PostGIS

I have a table of 100k+ non-overlapping POLYGON features, and a table of 50k+ simple LINESTRING features (each line has only 2 vertices). The below is a common arrangement of these features on a map, ...
  • 1,657
0 votes
1 answer
80 views

Split Polygon in one layer based on boundaries in second layer

I have two different polygon layers, 1 and 2. Now i want to split polygons in layer 1 taking reference from polygons in layer 2. Is it possible in qgis???? Please find attached image as reference ...
  • 613
2 votes
1 answer
41 views

Intersecting Polygon by a Gridded Polygon returns unexpected result

I have a regular polygon grid (grid) and irregular polygons (block). You can download the data here: https://we.tl/t-BczpR2K2lw I want to intersect the orange polygons (block) by the regular polygon ...
  • 3,249
4 votes
1 answer
511 views

PostGIS order intersections of line and polygon

I have a polygon and a line that goes through it. That line might exit my polygon and enter it again at a later point. So now I'd like to have a relative position inside my line, where those segments ...
  • 971
2 votes
2 answers
361 views

Split lines by a polygon - Why are "internal" lines split in parts using sf/st_split

The context: I have a border and routes followed by vehicles. I want to decompose the routes, cutting them everytime they cross a border, and for each part, know what are the distances performed. ...
  • 795
1 vote
2 answers
399 views

Removing longest segment of linestring and rejoining segments

I am trying to remove the segment that has the longest length from a linestring and join the two group of segments that remain by the shortest segment between them. That was easy, using ST_Difference (...
  • 181
1 vote
0 answers
231 views

ST_Split with ST_Dump returns multipart Linestring with additional Splits

I am trying to split a lingstring using another linestring as my blade. The line to be cut crosses over itself at different locations. (to_be_cut is linestring, not multilinestring) My query ...
  • 161
4 votes
1 answer
194 views

Splitting self-overlapping lines with points using PostGIS

I have a line geometry that partially overlaps itself (think about a line going A -> B -> C -> B -> D) and a set of points (not on the line but close to it) that I want to use to split the line in ...
  • 41
5 votes
2 answers
2k views

Splitting lines into basic segments at vertices with PostGIS?

I have a MultiLineString table in PostgreSQL and I am trying to obtain a table with all the segments obtained from those lines if we split them at their vertices. I have found this simple example, ...