[OpenLayers-Users] Questions: Projections, Google, Yahoo, etc

Jon Blower jdb at mail.nerc-essc.ac.uk
Tue Feb 20 03:52:35 EST 2007


Hi Trond,

I don't see how the "correct" units for Mercator projection are
metres.  I could be wrong though - could you point me to a reference
source that explains this?  I've had real problems finding definitive
explanations anywhere.  Mercator is a rectangular lat-lon projection
and I thought that degrees are the most natural units to use - it's
just that the latitude axis is non-linear.  Metres are no more logical
than degrees because metres and degrees are (almost) linearly related
in the latitude direction (1 degree latitude ~ 111km).  Therefore a
CRS in metres is just as non-linear in latitude as a CRS in degrees.
In fact, if you want to use metres it's harder to calculate the bounds
of a tile in the longitude direction since metres and longitude are
not linearly related.

If the behaviour of my WMS is incorrect (which is entirely possible)
then we need to find a coordinate system that is suitable for Mercator
- I don't think metres are correct and maybe degrees aren't correct
either.  Maybe "pixels" are the only logical choice to define a CRS
that is linear in both directions but this is very awkward when you
try to figure out how a client might formulate the request...

Jon

On 2/20/07, Trond Michelsen <trondmm-openlayers at crusaders.no> wrote:
> On Tue, Feb 20, 2007 at 08:15:39AM +0000, Jon Blower wrote:
> > Here's the same thing in Mercator: note that the bounding box is the
> > same (i.e. expressed in decimal degrees) but the projection has
> > changed to EPSG:41001:
>
> Whoa! I'm pretty sure that's incorrect behaviour.
>
> > From the server's point of view, the key is to calculate, for a given
> > BBOX and image width/height, the lat-lon coordinates of each pixel in
> > the image.  My (Python) code to do this is at:
> > http://www.resc.rdg.ac.uk/trac/ncWMS/browser/trunk/web/WEB-INF/jython/grids.py.
> >
> > From a tiling client's point of view, the key is to calculate, for a
> > given image tile, the correct BBOX in decimal degrees.
>
> Maybe I'm misunderstanding you here, but the WMS spec states that the
> coordinates used in BBOX are in the coordinate system defined by the
> CRS parameter. So, when you're using a Mercator projection, the
> BBOX-units is normally in meters.
>
> --
> Trond Michelsen
>
>


-- 
--------------------------------------------------------------
Dr Jon Blower              Tel: +44 118 378 5213 (direct line)
Technical Director         Tel: +44 118 378 8741 (ESSC)
Reading e-Science Centre   Fax: +44 118 378 6413
ESSC                       Email: jdb at mail.nerc-essc.ac.uk
University of Reading
3 Earley Gate
Reading RG6 6AL, UK
--------------------------------------------------------------



More information about the Users mailing list