[OpenLayers-Dev] WMS request mod

Bob Basques Bob.Basques at ci.stpaul.mn.us
Thu May 19 12:13:29 EDT 2011


Ray, 

My first thought here would be to use something like MapServer as a WMS client that could then pass through the WMS request in the reprojected form.  We do this for many layers coming into the City that we need projected to our local coordinate system.  Drawback is, you need a middle ware piece in the equation, with a spot to run the service from, etc.  There is also a performance hit because of the reprojection.  But if those aspects don't worry you, then you get a very good product out of the process this way, with a very high confidence level that things will get projected correctly. 

This route of configuration has many positives related to the organization of coding and how the data is accessed, but you still have the performance hit.  There are options for caching as well that could improve performance, but now you have the storage aspect to worry about. 

bobb 




>>> Ray Di Ciaccio <ray.diciaccio at ll.mit.edu> wrote:


Sorry for the previous messed up message. Let me try this again:

Hi all,

I'm in what I'm guessing is a fairly common situation -- I'm using
Google Maps as my baselayer (so map is in EPSG:9009l3 projection) and
I'm trying to load an overlay from a WMS which I have no control over.
It only offers data in EPSG:4326. The WMS request generated by
OpenLayers will be for CRS=EPSG:900913 and the BBOX values will be in
EPSG:900913. This obviously won't work if the WMS only offers EPSG:4326.
My solution to this problem was to override
OpenLayers.Layer.WMS.getFullRequestString() so that it uses the
projection that I set for that particular layer -- it changes the
CRS/SRS param to whatever the layer projection is, and it transforms the
BBOX values from the map projection to the layer's projection. This way
I get a valid request for the WMS and it's loaded in the correct
location on the basemap. My question is whether this is the right
approach to this situation and whether there may be unforeseen
repercussions to these changes I made.

Thanks!
- Ray

--
Ray Di Ciaccio
MIT LL, Group 42
781-981-2024
ray.diciaccio at ll.mit.edu

_______________________________________________
Dev mailing list
Dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20110519/8ddc97b2/attachment.html


More information about the Dev mailing list