0

I am looking for a way to get the coordinates of a new line using the provided coordinates of existing 2 lines. The maximum of existing coordinates of 2 input lines should form a new line.

sample data:

line,X,Y
2,654285.7888,7515952.277
2,652460.4172,7517950.319
2,650339.0394,7517530.977
2,648489.0006,7517210.304
2,644887.5917,7516790.962
2,642544.2092,7515828.942
2,642371.5389,7513633.562
2,643654.2325,7511980.861
2,647132.3054,7510747.502
2,653348.4358,7509711.48
2,656579.8369,7509144.135
2,657467.8556,7508428.786
2,658725.8819,7511857.525
2,656826.5088,7514348.91
1,655963.1573,7516001.612
1,652805.7578,7517234.971
1,649993.6988,7517703.648
1,646194.9524,7516741.627
1,643234.8903,7515335.598
1,643259.5575,7511413.516
1,647872.321,7509908.817
1,651868.4048,7510500.83
1,656530.5026,7509538.81
1,659095.8897,7512079.53
1,658109.2023,7514620.25

Plotting these coordinates for each line gives the following two lines: line 1 and line 2

The objective is to manipulate the Line 1 (blue) given by the Line 2 (orange), i.e. outer most of these 2 lines should form a new line and get coordinates for that new line. The expected new line, Line 3 (black) should be like below:

expected line 3

Any help in providing an approach or guiding towards right resource would be highly appreciated.

abhy3
  • 262
  • 6
  • 18
  • Merging polygons --> https://deparkes.co.uk/2015/02/28/how-to-merge-polygons-in-python/ – Reblochon Masque Feb 27 '20 at 03:33
  • 1
    also here: https://stackoverflow.com/questions/2667748/how-do-i-combine-complex-polygons/19475433#19475433 , and there: https://mathoverflow.net/questions/111296/subtract-rectangle-from-polygon/111323#111323 , ansd here too: https://math.stackexchange.com/questions/15815/how-to-union-many-polygons-efficiently – Reblochon Masque Feb 27 '20 at 03:43
  • I'm not sure the problem is well defined. To solve this, it's first necessary to formulate in an unambiguous mathematical way which points are "outer". – Jussi Nurminen Feb 27 '20 at 06:48

0 Answers0