Jump to content

Recommended Posts

Posted

This one is tough. I don't even have a clue on how to start, not even a theory.

 

I have multiple polylines running all over the place, with intersections, turnouts, etc. What I need to do is to represent lines that are closer than 2m to each other as one line.

 

I'm not asking for someone to solve the problem for me, but I need ideas on how can I go about this.

 

I'm attaching a sample, and this is not the most complicated part.

The second picture shows the result which I created by hand. I created a 2m buffer zone around the lines, then drew the white line along the middle of the buffer. This could be a solution but I have no idea how to find the middle line of the buffer zone in programming. The biggest problem is where it splits into two lines, because in the buffer then there is an island which is a separate object.

névtelen.jpg

névtelen2.jpg

Posted

I was thinking if I create a buffer around the lines, it will merge the close lines, but then I'd still have to find the center line of the buffer, which is especially difficult if there is an island in it.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...