[josm-dev] projection Mercator, set EPSG 3785 instead of EPSG 3857

Sebastian Klein bastikln at googlemail.com
Tue Mar 8 15:26:44 GMT 2011


Tobias Wendorff wrote:
> Am 08.03.2011 14:53, schrieb Josh Doe:
>> And as far as OSM putting "both datums on the same level", I have to
>> disagree. OSM itself explicitly says all coordinates are in WGS84.
>> There may be certain applications which mix things up, but that's not
>> the fault of OSM.
> 
> Let me explain it in numbers, perhaps my English is too bad:
> 
> WGS84 coordinates (LAT,LON): 51.0, 7.0
> [1] projection to EPSG:3785 (x,y): 5677294.03, 781182.21 (sphere)
> [2] projection to EPSG:3857 (x,y): 5677294.03, 775978.50 (ellipsoid)
> 
> When a software uses the spherical formular of mercator, the
> coordinates will be drawn at "5677294.03, 781182.21".
> 
> If the inverse mercator formular is also the spherical one,
> more errors will be added... x/y-coords to geographical ones:
> [3] 5677294.03, 781182.21 => 51.000000, 7.046703
> 
> Used parameters on cs2cs:
> [1] cs2cs +proj=latlong +datum=WGS84 +to +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
> 
> [2] cs2cs +proj=latlong +datum=WGS84 +to +proj=merc +datum=WGS84 \
> +units=m +nadgrids=@null +no_defs
> 
> [3]
> cs2cs +proj=merc +datum=WGS84 +units=m +nadgrids=@null +no_defs \
> +to +proj=latlong +datum=WGS84 -f %.6f

I'm not an expert, but this does not look right to me.

The EPSG describes "Popular Visualisation Pseudo Mercator" projection (used by both EPSG:3785 and EPSG:3857) as:
>>>>>>>>>>>>>>
This method is utilised by some popular web mapping and visualisation applications. It applies standard Mercator (Spherical) formulas to ellipsoidal coordinates and the sphere radius is taken to be the semi-major axis of the ellipsoid. 
[...]
Unlike either the spherical or ellipsoidal Mercator projection methods, this method is not conformal: scale factor varies as a function of azimuth, which creates angular distortion.
<<<<<<<<<<<<

For this to work, the (lat,lon) coordinates have to be in WGS84 in the first place. EPSG:3785 defines (lat, lon) to be spherical, so it is not useful for osm in any way.

To sum it up: JOSM's use of EPSG:3857 is correct at the moment.


[1] http://www.epsg.org/guides/G7-2.html

Sebastian



More information about the josm-dev mailing list