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.
Answer
It seems to be a straight line in whatever projection system pertains when it is created. After that, it is recalculated in each new projection, and the software trys to make it 'stratght'. this is quite noticeable near the poles: a square drawn round the pole in a polar azimuthal projection will invariably turn into a circle (that is, the formerly stratight sides become curves concave towards the pole) when re-projected to another polar azimuthal, or even if the central meridian is changed. the software just does not know how to get from one vertex to the next, so it takes what must seem to it a logical path....
This is why one densifies the vertcies in such situations. That anchors the polygon edges to known coordinants, even though there will still be the same interpolation going on between each vertex.
No comments:
Post a Comment