Equirect declares a flattening whose y is linear in degrees; a city cut from the Web-Mercator tile world is not that, and declaring it as that would misplace every recovered latitude by meters. Two new experimental map keys -- atlas.geometry.mercator.px and .deg -- spell the window a Mercator cut fills and the ground it pictures, y linear in asinh(tan lat), so a reader can run a packed position backward and stand on the street it was published at.
- commit
- 9f653cadc68a471d57bfe2556d6739c846ab3199
- parent
- ef7a9d21ab4dc5a99e453afddb9c03986171fdf8
- author
- Dami <dami.etoile@gmail.com>
| M | internal/ | 2 | ++ |
| M | internal/ | 13 | +++++++++++++ |
@@ -23,6 +23,8 @@ breaks; new keys arrive as `experimental` and earn `stable`.
2323 | `atlas.geometry.projection` | map | `equirect` | stable | How a sphere was flattened. Required when surface is `sphere`. |2424 | `atlas.geometry.equirect.px` | map | `x,y,w,h` (world px) | stable | The raster window the projection fills. |2525 | `atlas.geometry.equirect.deg` | map | `west,north,east,south` (degrees) | stable | The ground that window pictures. |26+| `atlas.geometry.mercator.px` | map | `x,y,w,h` (world px) | experimental | The raster window a Web-Mercator cut fills. Where `equirect` declares y linear in degrees, `mercator` declares y linear in projected latitude — `asinh(tan lat)` — the flattening a real-world tile window actually is. |27+| `atlas.geometry.mercator.deg` | map | `west,north,east,south` (degrees) | experimental | The ground the Mercator window pictures, in degrees at its edges. |2628 | `atlas.geometry.body` | map | slug, e.g. `mars` | experimental | The body pictured. |2729 | `atlas.geometry.radius_km` | map | decimal string | experimental | The body's mean radius. |2830 | `atlas.geo.lat` | location | decimal degrees | experimental | True planetary latitude as published (planetocentric). Provenance and card material; rendering derives from the map-level mapping. |@@ -90,6 +90,17 @@ const (
9090 // as "west,north,east,south".9191 KeyGeometryEquirectDeg = "atlas.geometry.equirect.deg"9292 93+ // GeometryMercatorPx is the raster window a Web-Mercator cut fills, in94+ // world pixels, as "x,y,w,h". Where equirect declares y linear in95+ // degrees, mercator declares y linear in the projected latitude --96+ // asinh(tan latitude) -- which is the flattening a real-world tile97+ // window actually is.98+ KeyGeometryMercatorPx = "atlas.geometry.mercator.px"99+100+ // GeometryMercatorDeg is the ground that window pictures, in degrees at101+ // the window's edges, as "west,north,east,south".102+ KeyGeometryMercatorDeg = "atlas.geometry.mercator.deg"103+93104 // GeometryBody names the body pictured, e.g. "mars".94105 KeyGeometryBody = "atlas.geometry.body"95106 @@ -207,6 +218,8 @@ var registry = map[string]definition{
207218 KeyGeometryProjection: {EntityMap, Stable, enum(ProjectionEquirect)},208219 KeyGeometryEquirectPx: {EntityMap, Stable, numbers(4)},209220 KeyGeometryEquirectDeg: {EntityMap, Stable, numbers(4)},221+ KeyGeometryMercatorPx: {EntityMap, Experimental, numbers(4)},222+ KeyGeometryMercatorDeg: {EntityMap, Experimental, numbers(4)},210223 KeyGeometryBody: {EntityMap, Experimental, slug},211224 KeyGeometryRadiusKM: {EntityMap, Experimental, decimal},212225 KeyGeoLat: {EntityLocation, Experimental, decimal},