11 ms·
Any idea whether this depends on the projection used to get the map in the first place? I mean, the "straight lines" are really curves that lie in the boundary
by epi8 13y ago
Any idea whether this depends on the projection used to get the map in the first place? I mean, the "straight lines" are really curves that lie in the boundary of the Earth's surface, unless I'm missing something major.
- baddox 13y agoYeah, I'm wondering if the projection used has the property that straight lines lie on great circles. And from what I remember about geoids, it seems like the term "great circle" wouldn't even apply to all of them.
- Avshalom 13y agoTennesse's line looks fairly curved so I'm guessing it's done on a sphere.
- jofer 13y agoNo, the plotting is all done in geographic. That's just the shape of TN's border. It's not a straight line in any coordinate system. (For example, have a look at google maps, which is in geographic. The northern border of the state roughly follows a parallel, but the details are more complicated due to history and local politics.) I didn't look at the code in detail (and my R is quite rusty), but the fact that he's using the geosphere package suggests that the intersection calculation is being done on a spherical shell, rather than cartesian space.
- baddox 13y ago> It's not a straight line in any coordinate system. I bet I could propose a coordinate system in which it was a straight line. ;)
- lil_tee 13y agoI think the projection becomes relevant when you're looking at "straight" borders like Colorado. A great circle will bend slightly north of the northern border, so you can actually just barely touch Wyoming and Nebraska, but I don't think the projection is significant when looking at some of the more irregularly shaped states
- homeomorphic 13y agoIt doesn't matter. He's counting the number of times a continuous curve C on the surface of the Earth crosses other continuous curves (state boundaries). A crossing is a property of the curve and its embedding onto the Earth's surface. While a (continuous) map projection can deform both C and the state boundaries, it cannot create or destroy crossings. To draw the crossings, however, he needs to pick a projection and project both C and the state boundaries, which I guess is why he included some PROJ.4 calls.
- abstrakraft 13y agoIt does matter - he only considers continuous curves that are projected onto straight lines, which is a property of the projection.
- adolgert 13y agoThat's an excellent question. Latitude and longitude are straight in the projection he is most likely using, but great circle arcs are what we consider straight on the globe. The kicker is that most political boundaries are neither. They are Rhumb lines, aka loxodromes, which mean that someone started walking in a direction and kept going. The standard solution for this is to put lots of little points into the state GIS definition, so that the points get transformed correctly. That way short line segments don't differ by more than a few meters. That means you have to watch out for simplified state representations, but not much else, unless you're being a stickler.
- waqf 13y ago> Rhumb lines, aka loxodromes, which mean that someone started walking in a direction and kept going. To be clear, they mean that you keep going in the same compass direction. If you kept going in the direction which seemed straight ahead to you there on the ground, then what you'd get (under suitably idealized conditions) is a great circle.
- tantalor 13y agoLocally, it would zig-zag all over the place, like the US-Canada border: http://www.youtube.com/watch?v=qMkYlIA7mgw http://www.youtube.com/watch?v=qMkYlIA7mgw
- mjw 13y agoSo with a few minor complications convexity generalises to Riemannian manifolds like the earth. You need to replace "straight line" with "minimising geodesic" i.e. shortest path, which don't depend on the choice of coordinate chart, just on the Riemannian manifold structure (which includes an inner product hence a metric). This is complicated slightly when there isn't a unique shortest path between any given two points (e.g. the earth's north and south poles), leading to definitions of strongly convex, convex and weakly convex. See http://en.wikipedia.org/wiki/Geodesic_convexity http://en.wikipedia.org/wiki/Geodesic_convexity and the debate at http://en.wikipedia.org/wiki/Talk:Geodesic_convexity#Disputed http://en.wikipedia.org/wiki/Talk:Geodesic_convexity#Dispute...