What shape is this polygon?
POLYGON((-40.0 52.0, 102.0 -6.0, -67.0 -29.0, -40.0 52.0))
Of course, that depends on what projection it is in, but let’s skip cartesian systems and look at it as a geographic shape on the sphere. Google Earth thinks it is shaped like this:
But I don’t really think so. It all comes down to how you interpret the edges. I’m not sure what rule Google Earth is using to interpret the edges, but they aren’t Great Circles, because this is what a Great Circle map of the polygon looks like:
See how far south and north they get? Way different from the Google Earth interpretation. If anyone knows what rule Google Earth uses, I’d love to hear it.
Update: Here is the KML if you want it.
<?xml version="1.0" encoding="utf-8" ?> <kml> <Placemark> <Polygon> <outerBoundaryIs><LinearRing><coordinates> -40,52 102,-6 -67,-29 -40,52 </coordinates></LinearRing></outerBoundaryIs> </Polygon> </Placemark> </kml>
Update 2: In the comments, GeoXP posits and Mano Marks confirms that the polygon edges are rhumb lines. Mano notes that curiously, if you draw the same lines as, er, lines, instead of polygons, they will follow great circles instead.
Update 3: Once I take the bit between my teeth, you can’t stop me. In the KML 2.2 specification, the OGC has also ratified this fun interpolation scheme! “The boundary control points of each descendent kml:LinearRing are first projected to the plate carrée plane (where altitude is dropped), then straight line segment interpolation in the plate carrée (long,lat) plane is used between consecutive control points. The interior points are then filled in linearly in the plate carrée plane. Finally, the (long,lat) points of the polygon in the plate carrée plane are mapped back to (long.lat,alt) points on the earth’s terrain surface model.”
Update 4: In the comments, Mike Sumner suggested that I try one over the dateline because it’s “much dumber”. Who can resist an offer like that? So I just translated the whole polygon 150 degrees to the west, giving us this KML:
<?xml version="1.0" encoding="utf-8" ?> <kml> <Placemark> <Polygon> <outerBoundaryIs><LinearRing><coordinates> 170,52 -50,-6 143,-29 170,52 </coordinates></LinearRing></outerBoundaryIs> </Polygon> </Placemark> </kml>
And here is what it looks like in the venerable Google Earth.
Basically, it refuses to cross the dateline, it takes the long way around. Which, if you read the OGC description, is entirely unsurprising, since all the interpretation of the edges is happening in cartesian space, in plate carrée, where there is no “dateline” and Siberia and Alaska are at opposite sides of the plane, farther apart than New York and London.
Update 5: Last one. Because the effect is hard to see in the last example, see how this small triangle over the dateline is rendered (in green, below):
POLYGON((170 72, -170 70, -165 54, 170 72))
A polygon enclosing the pole looks even cooler (in yellow, below).
POLYGON((45 85, 135 80, -135 85, -45 80, 45 85))
That dateline is sacrosanct!