Skip to main content
Question

How to create a new line in the centre between two existing lines?

  • November 23, 2021
  • 4 replies
  • 20 views

aron
Supporter
Forum|alt.badge.img+16
  • Supporter

How would one create a new line that lies right in the middle between two existing lines? Imagine that we have the blue and pink lines below, they are parallel but not identical, and we want to find the centre (doted) line between them.

 

I was thinking one could AreaBuild the lines and then chop the resulting polygon into shorter segments, use a CentrePointReplacer on the segments and then finally connect the points. But before I dive down that rabbit hole I was wondering if there was a more efficient method to achieve this?

 

morp

4 replies

virtualcitymatt
Celebrity
Forum|alt.badge.img+35

If you can get a polygon of the parallel lines then you can try just the CenterLineReplacer. This should give a pretty good fit. There might be some issues at the ends though. But that would be my first approach.


Forum|alt.badge.img+2
  • November 23, 2021

@aron​ do you have an example dataset that you can share?


aron
Supporter
Forum|alt.badge.img+16
  • Author
  • Supporter
  • November 23, 2021
markatsafe wrote:

@aron​ do you have an example dataset that you can share?

Hi @Mark Stoakes​ ,

This question originated from an idea I had where I was wondering what results I would get if I morphed together two datasets with different levels of detail. Take a coast line as example and imagine two official datasets, one in 1:150k and the other in 1:10k. Could these be combined to get a line in 1:60k that would look better and be more accurate than the 10k source run through a generaliser? The underlying assumption here is of course that both sources have been properly cartographed for their respective scales. What results would I get if I gave the computer the input from two separate sources where humans have applied their experience and knowledge, in stead of just one.

 

So far this is an interesting rabbit hole, I have not yet prepared any datasets to test this idea on.

 

(edit: I of course ment to generalize the 10k, not the 150k source)


caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • November 24, 2021

I think that if we use @virtualcitymatt​'s idea of creating a polygon and extracting it's centerline you cold use HullAccumulator to create a Concave Hull, do a little cleanup and send the result to a CenterlineReplacer and then to Generalizer.

On the other hand, cartographic generalization shouldn't be done this way. You should generalize the 1:10k geometry to obtain a valid 1:60k coast line.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings