[OpenLayers-Users] Questions: Projections, Google, Yahoo, etc
olivier.terral
olivier.terral at geomatys.fr
Tue Feb 20 04:20:55 EST 2007
Hi,
We use geoserver and mapbuidler (and OL in a future for increase display time) for display NetCdf data
In geoserver the definition of EPSG:41001 is this:
PROJCS["WGS84 / Simple Mercator",
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS_1984", 6378137.0, 298.257223563]],
PRIMEM["Greenwich", 0.0],
UNIT["degree", 0.017453292519943295],
AXIS["Lon", EAST],
AXIS["Lat", NORTH]],
PROJECTION["Mercator_1SP"],
PARAMETER["central_meridian", 0.0],
PARAMETER["scale_factor", 1.0],
PARAMETER["false_easting", 0.0],
PARAMETER["false_northing", 0.0],
UNIT["m", 1.0],
AXIS["x", EAST],
AXIS["y", NORTH],
AUTHORITY["EPSG","41001"]]
So it's a projection in meters .
We have display netCdf in mercator projection but problem for displaying
data with google map because it's in decimal degree.
http://testbed.geomatys.fr/mapbuilder/demo/netCDF/
I think problem can be resolve in OL because in Mapbuilder there are
functions for calculates lat/lon in meters and inverse.
I don't know exactly how OL proceed but when OL request a wms (with a
google map base layer) Ol use epsg:4326, It must be possible to send a
request in 41001 when the projection is in meters ( property: map.units)
and to use Mapbuilder functions for convert units ( may be creating
a projection class in OL) .
What do you think about ?
Jon Blower a écrit :
> 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
>>
>>
>>
>
>
>
More information about the Users
mailing list