In this case, and many other cases using spherical projections, the desired approach is to actually treat the lat/long locations on the sphere as if they were on WGS84 without any adjustments when using them for converting to other coordinate systems. The solution is to “trick” PROJ.4 into applying no change to the lat/long values when going to (and through) WGS84. This can be accomplished by asking PROJ to use a null grid shift file for switching from your spherical lat/long coordinates to WGS84.
+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs
The key here was the +nadgrids=@null, which I’d never seen anywhere before.
The end result?
- Fixing my OSM Tiles
- WMS and TMS overlaid in OpenLayers, as described in an email
- A slightly better understanding of what I didn’t understand for so long.
So. Nice. To not feel lost anymore.
Three cheers for sharpgis! Hooray hooray hooray!