I have a line string and two points with me. I need to understand how to calculate the distance between two points along the provided line string. Also, note that in some cases, the provided points can be the same as the points in the line strings.
Case 1:
point_1 = [145.01335373083108, -37.83531345902471]
point_2 = [145.0133087,-37.8355784]
line_string = [[145.0123086, -37.8323874], [145.0124038, -37.8323978], [145.0127101, -37.8324314], [145.0130083, -37.8324631], [145.0131113, -37.8325173], [145.0131586, -37.8325914], [145.0135326, -37.8332436], [145.0136158, -37.833392], [145.0136377, -37.8334482], [145.0136437, -37.8335063], [145.0136287, -37.833663], [145.0135595, -37.8340508], [145.013449, -37.8346943], [145.0134461, -37.8347113], [145.0134418, -37.8347953], [145.0133087, -37.8355784], [145.0132317, -37.8360771], [145.0132176, -37.8361681]]
Case 2:
point_1 = [145.0135595,-37.8340508]
point_2 = [145.0133087,-37.8355784]
line_string = [[145.0123086, -37.8323874], [145.0124038, -37.8323978], [145.0127101, -37.8324314], [145.0130083, -37.8324631], [145.0131113, -37.8325173], [145.0131586, -37.8325914], [145.0135326, -37.8332436], [145.0136158, -37.833392], [145.0136377, -37.8334482], [145.0136437, -37.8335063], [145.0136287, -37.833663], [145.0135595, -37.8340508], [145.013449, -37.8346943], [145.0134461, -37.8347113], [145.0134418, -37.8347953], [145.0133087, -37.8355784], [145.0132317, -37.8360771], [145.0132176, -37.8361681]]