[OSM-dev] OSM and OpenLayers Projections

Christopher Schmidt crschmidt at metacarta.com
Sat Aug 11 01:40:56 BST 2007


On Fri, Aug 10, 2007 at 07:10:32PM +0100, Robert (Jamie) Munro wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> > Is this a unique projection for OSM?
> 
> No, it is Mercator.

It is a specific mercator spatial reference -- note that there are *many
many* mercator projections.
(http://spatialreference.org/ref/epsg/?search=mercator&srtext=1)

The specific spatial reference used by OpenStreetMap is
http://spatialreference.org/ref/user/6/ .

> Last time I looked, the way that Mercator was handled in OpenLayers, it
> seemed very overcomplicated. It used a version of Mercator that took
> into account that the earth wasn't spherical and translated everything
> into "meters in the mercator projected plane". The tiles use a simpler
> spherical-earth mercator projection. I like to think of them in degrees
> of longitude and mercator degrees latitude.

OpenLayers doesn't 'deal' with mercator at all -- it just treats
everything as rectangles. There have been some projection maths which
I've used to work with projecting data into OpenLayers versions of the
maps I've made.

Standard GIS projection libraries don't have strong support for
'mercator with sphere model of earth' -- that particular type of
Mercator projection is not widely used -- and the projection maths
around the OpenLayers stuff I've built have been designed to work with
Mercator as it is used by other projects -- with an ellipsoidal earth. 

However, all this was a wrapper around OpenLayers to cope with making
the data I could generate work with the tools that I had available.
These days, it's probably unneccesary to use anything I would have
written back then. So, previous posts of mine (before a week ago) would
have been more complex than need be.

Regards,
-- 
Christopher Schmidt
MetaCarta




More information about the dev mailing list