Search code examples
rgeor-sf

Overlap of polylines


I am trying to find what percentage of overlap there is between two lines. Given the example below, I believe stick 2 overlaps stick 1 by 100%. While stick 1 overlaps stick 2 by ~45%. Any idea how to compute?

structure(list(stick_1 = "a", surf_longitude = 845664.186685473, 
    surf_latitude = 309868.295877194, bh_longitude = 847024.324665602, 
    bh_latitude = 305762.239300677, stick_2 = "b", 
    Offset_surf_longitude = 846279.271745815, Offset_surf_latitude = 305380.768014799, 
    Offset_bh_longitude = 843039.956467968, Offset_bh_latitude = 315087.243453924), row.names = 1L, class = "data.frame")

thanks!


Solution

  • I was overthinking it. See attached image for solution.answer