[webmap-discuss] zoomlevels in OWSContext?

Paul Spencer pspencer at dmsolutions.ca
Fri Jun 30 10:58:54 EDT 2006


One of the proposals that was being floated around as part of the  
discussion of WMS-C (wms cached tiling) was the idea that there would  
be a set of scales that all servers would agree to support and a  
common projection too.

I was initially against this idea, but I am becoming more enamored  
with it as I think about the implications.  My take on it is that a  
WMS-C server would agree to support a subset of the

A set of scales that seems to make intuitive sense is obviously the  
Google/Yahoo/Microsoft (GYM) set, since they all seem to use the same  
set of scales (and projection).  Unfortunately, I'm not sure that  
everyone would actually want to use their scales/projections since  
they don't make a lot of sense for regular GIS use.

Another scheme I though about (and discussed with a few folks on IRC)  
is to start at a scale of 1:1 and use a x2 factor to calculate all  
other scales.  If all the parameters that can affect tiling are  
nailed down such that any tile request can be guaranteed to match the  
identical tile request to another server then we've got a system  
where clients can ingest tiles from any source and overlay them nicely.

For those that are interested, I've spent some time digging into the  
google scheme and here is what I found out ...

These articles (http://cfis.savagexi.com/articles/2006/05/03/google- 
maps-deconstructed and http://cfis.savagexi.com/articles/2006/05/05/ 
google-maps-revisited) explains what Google is doing (not sure if it  
is accurate or not, but it seems like a thorough analysis).  It boils  
down to using a WGS84 Mercator projection and zoom levels set up as  
factors of two with zoom level 0 being constructed such that the  
earth fills a 256x256 tile.  Its a pretty neat scheme ...

I've done some calculations based on this scheme and some tests.  It  
turns out that you can reproduce Google's tiling scheme using a  
projection of:

# World Mercator
<54004> +proj=merc +lat_ts=0 +lon_0=0 +k=1.000000 +x_0=0 +y_0=0  
+ellps=WGS84 +datum=WGS84 +units=m  no_defs <>

in mapserver (thats not an official epsg code btw)

with world extents of

   EXTENT	 -20037508.342789 -19994875.249796  20037508.342789   
19994875.249796

which represent -180,-85.05112877980660,180,85.05112877980660 in lon/ 
lat (see http://cfis.savagexi.com/articles/2006/05/05/google-maps- 
revisited)

Using a generalized version of the vmap0 data, I was able to produce  
a 256x256 tile that matches Google's top level tile almost precisely  
(differences due to antialiasing and the odd pixel here and there  
that I assume come from the generalization or data).

Hope someone finds this useful at some point

Cheers

Paul

On 30-Jun-06, at 7:55 AM, Steven M. Ottens wrote:

> Hi all,
>
> I'm pondering how to store fixed zoom levels in Mapbuilder. Google has
> them hardcoded in their code, but that only works if you control both
> the client and the server (like google does). We could also put
> hardcoded zoomLevels, but that would force the servers to adept to the
> client. I prefer to make it configurable, but a problem is that
> different servers can have different zoomLevels.
> Currently we store out layers in a WMC document, but we're  
> switching to
> OWSContext to allow for more types of layers then just WMS layers.  
> Since
> the zoom levels are depending on the server, it makes sense to me to
> store these levels in OWSContext.
> Are there any OWSContext experts around who can tell me if that's
> already in the standard, if not, what would be a proper place and name
> for such a thing?
>
> Also are there ideas how to solve the problem of having different  
> layers
> with different zoom levels. It is a problem which we all are going to
> face at one point or another and it might be a good idea to have a
> similar solution to this problem to increase mergability.
>
> Regards,
> Steven
> -- 
>
> Geodan S&R Amsterdam
>
> -------------------------------------
> Geodan S&R
> President Kennedylaan 1
> 1079 MB Amsterdam (NL)
> -------------------------------------
> Tel: +31 (0)20 - 5711 311
> Fax: +31 (0)20 - 5711 333
> -------------------------------------
> E-mail: steven.ottens at geodan.nl
> Website: www.geodan.nl
> Disclaimer: www.geodan.nl/disclaimer
> -------------------------------------
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webmap-discuss-unsubscribe at mail.osgeo.org
> For additional commands, e-mail: webmap-discuss-help at mail.osgeo.org
>

+-----------------------------------------------------------------+
|Paul Spencer                           pspencer at dmsolutions.ca   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+








More information about the Webmap-discuss mailing list