Skip to content

ValueError: Input geometry segment overlaps with the splitter. #2026

Answered by mwtoews
forestbat asked this question in Q&A
Discussion options

You must be logged in to vote

The problem is that one of the input geometry segments overlaps with the splitter, as the error message describes. Even if you isolate the one line that touches the input line (so they are both LineString types) you will still see this message.

assert origin_line.overlaps(multiline)
print([origin_line.overlaps(part) for part in multiline.geoms])
# [False, False, True]
assert origin_line.overlaps(multiline.geoms[2])
split(origin_line, multiline.geoms[2])
# ValueError: Input geometry segment overlaps with the splitter.

to fix the error, the line must intersect the line in a way that it can "cut" it, and no go parallel along with it. This is the current geometries, where blue is origin_line

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by forestbat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants