[GRASS-user] projection issue

Hamish hamish_b at yahoo.com
Mon Mar 24 13:24:27 PDT 2014


Vincent:

> the trouble I am currently experiencing is dealing partly with
> cs2cs, but partly with grass, so I post my question on this
> list...
> 
> Being within a Mercator location, defined with the location
> wizard (calling epsg:3857), I type :
...
> I can't figure what is going wrong. Would anyone have an idea ?


Hi,

First of all, avoid using Google's "spherical mercator" projection for anything other than necessary data import/export if you can possibly help it. But sometimes we don't have a choice, so..

Google's spherical Mercator projection (formerly the unofficial
epsg-ish code 900913 from the esri.extra file) isn't really WGS84, it just borrows the major axis of the Earth used in WGS84 for both the major and minor axes of the ellipsoid, making it a sphere larger than Earth really is. So it's just a simple Mercator on a sphere, which happens to have a particular radius.

Different ellipsoids (and a sphere being a type of ellipsoid) squash the Earth north-south, so the northing value changes the most. Since Mercator doesn't deform east-west (lines of longitude are all parallel and perfectly vertical), in that projection changing the ellipsoid does not change the easting value at all.

Next thing to know is the +nadgrids=@null hack to get around the datum transform. See
http://trac.osgeo.org/proj/wiki/GenParms#ThenullGrid

and this basically explains the rest:

http://trac.osgeo.org/proj/wiki/FAQ#ChangingEllipsoidWhycantIconvertfromWGS84toGoogleEarthVirtualGlobeMercator


fyi, +wktext has to do with "well known text" .prj file text, and requests to software in-the-know that the non-standard "+nadgrids=@null" projection term gets recorded when you export in that way. The default (without +wktext) is to only export official spec. terms, for compatibility with brittle software which might have to import it later and can't deal with anything beyond the official WKT spec (or ESRI's diversions from it, but there's another g.proj flag for that..).


good luck,
Hamish



More information about the grass-user mailing list