Is there a definition on how lines connect vertices in the shapefile format?
In the simplest case, imagine a line with only 2 points, from 40,-118 to 40,-112 - that's somewhere random in the US - with standard WGS84 geographic coordinate system. Here is the content of the .prj file:
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
Is the point say 40.1,-116 north or south of the line?
- If we consider lines are linearly interpolated in the latlong space, it follows the 40 deg parallel (small circle) and the point is north of the line.
- If we consider lines are shortest paths on the Earth surface, it's a geodesic (great circle) with a maximum latitude at the middle of the line, higher than 40.1 deg. Then the point is south of the line.
- Or is it simply undefined? Since shapefile format has no notion of curves, but only straight segments connecting lines. Line needs to be densified (points added along the line) to clarify this answer.
If I create such scenario in QGIS, the line follows the 40 deg parallel, and would tell me answer is 1. But I wouldn't take this as a definite answer and would like to hear a more solid one.