[Tilecache] SRS parameter

Christopher Schmidt crschmidt at metacarta.com
Fri Mar 21 14:06:15 EDT 2008


On Fri, Mar 21, 2008 at 05:49:33PM +0100, Mauclerc Anthony wrote:
> I'm in charge of a web application (InfoTerre) that shares french
> geological information. In the current version, we use MapBuilder 1.0 on
> client side to request our WMS servers, with some developments around
> that tool. One of those customizations consists in switching the SRS at
> runtime with respect to the location and the scale : for instance, the
> SRS is Lambert II if you are in France but switches to WGS84 if you zoom
> out enough (if I am not clear, I let you see it at
> http://infoterre.brgm.fr <http://infoterre.brgm.fr/> ). Of course, the
> WMS server has to be able to deal with both projections. 

Understandably. Is the place that you change it a fixed resolution/zoom
level/scale?

> Presently, for performance issues, we are working on a new version that
> embeds MapBuilder 1.5 (based on OpenLayers) and that uses some raster
> layers as WMS-C (we use TileCache). So far, our tests are promising
> since we can get the default raster layer on France in Lambert II.
> However, TileCache does not take SRS into account which is blocking for
> us. 

That is correct. TileCache chooses to work baesd entirely on the
parameters that are set in the configuration. (This applies not only to
SRS< but also to extents, resolutions, etc.: there's no way to
automatically change a grid in EPSG:4326 to some other projection within
TileCache.)

> We are thinking of implementing SRS switching in TileCache (we could
> generate independently, let's say, 3 levels in EPSG4326 and 7 levels in
> EPSG27582, with potentialy level overlaps and requests the same
> TileCache and the same layer in EPSG4326 and EPSG27582). I do not know
> much about TileCache code architecture but I imagine we could add a top
> level folder in the tile storage that specifies the SRS : 

I don't think this is a good idea. Instead, I would recommend that you
have your TileCache code include *two* layers: one in each projection,
with options that you configure. (bbox, resolutions, etc.) Then, in your
client, you configure two different layers: one in each of the
underlying resolutions. Then, using something like:

http://trac.openlayers.org/ticket/1249

To reproject the point when the base layer changes from one to the
other. 

This fits better within the design of OpenLayers and TileCache.  

Do you think this might fit your needs?

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Tilecache mailing list