4 ms·
yeah, lat/lon/alt is more common, but I like lon/lat for the same reason you do (you can plot lon=x, lat=y and get a crappy Mercator projection). I also often w
by cozzyd 5y ago
yeah, lat/lon/alt is more common, but I like lon/lat for the same reason you do (you can plot lon=x, lat=y and get a crappy Mercator projection). I also often work with stereographic coordinates a lot which uses x-y, and that also colors my perception.
- geokon 5y agoMy point was that simply flipping lat/lon to be lon/lat is a cheap fix that still leaves you with problems. What I propose is to go "all the way" and make an internal positive/unsigned South/East coordinate system that naturally matches the display coordinate system (the inverted X-Y). It's sufficiently different that you'll never get confused and flip things at API boundaries. It's also sufficiently weird that you won't expose it to others :)
- cozzyd 5y agoWell, display coordinates are different from typical plot coordinates in any standard plotting package (of course, many plotting packages also support GIS, sort of making this a moot point). Yeah, if you're going to display coordinates you'll have extra problems.
- geokon 5y agoIt's not a moot point because you wanna debug stuff :) If things are looking weird or wrong on your display then you need to go back to your internal values to inspect what's wrong. When the internal value covary with th display values then this makes life significantly easier Not to mention things have a tendency to blow up when you start testing in the southern hemisphere haha That said.. I don't personally use any magic plotting packages. I just generate my own graphics with svg. It's quite easy and everything is debuggable
- xvedejas 5y agolon=x, lat=y is not Mercator at all, it gives the "equirectangular" projection. This has none of the nice properties of Mercator (angles are heavily distorted).
- cozzyd 5y agoyeah, you're right! but for showing a relatively small part of the world, it doesn't matter (and in fact, usually I'm plotting things in Antarctica where Mercator's area explosion is an anti-feature).
- xvedejas 5y agoThe more you zoom in, the better Mercator should be. That's a big part of why Web Mercator exists: there are no other options beyond mercator if you want a projection where north is always up, and right-angle street intersections look correct at any latitude. You can't notice the scale difference when zoomed in somewhere. Going super close to the poles should be a challenge for both mercator and equirectangular projections, but at least Mercator won't distort shapes at the same time (and neither is globally accurate for area).
- xvedejas 5y agoTo add a bit more detail: the amount you have to zoom in for shapes to look right will increase with absolute latitude. So the equator pretty much always looks good on Mercator, Europe looks good if you're looking at the continent scale, but then in Greenland and Antarctica you'll need to be zoomed in to a regional or city-size, or even closer in. So when it's really important to get a broad-scale view near the poles, map makers will switch to something like a polar stereographic projection or similar. (I've personally just used a transverse mercator projection (whatever UTM zone is most convenient) when doing data analysis near the poles.)
- cozzyd 5y agoplays around in QGIS yeah, you're completely right!