[Tilecache] WMS (il)legal URLS

Christopher Schmidt crschmidt at metacarta.com
Thu Jan 17 20:39:09 EST 2008


On Thu, Jan 17, 2008 at 01:40:14PM -0800, Paul Ramsey wrote:
> Did you know that in order to create legal WMS client URLs you have to  
> contravene the usual rules of URL construction? I bet you didn't.

You'd be wrong: I did. We've bumped into it a number of times with
OpenLayers (and it still doesn't do the right thing -- though I'll admit
I'm not really in a position where I consider it particularly
important.)

> Tilecache generates this URL
> 
> http://openmaps.gov.bc.ca/ecwp2/ecw_wms.dll?layers=REGIONAL_MOSAICS_BC_VANDERHOOF_XC500MM_UTM10_2006&styles=&service=WMS&width=256&format=image%2Fjpeg&request=GetMap&height=256&srs=EPSG%3A4326&version=1.1.1&bbox=-125.685975321%2C52.8956903062%2C-124.441343334%2C54.1403222933
> 
> Based on this configuration
> 
> [vanderhoof]
> type=WMS
> url=http://openmaps.gov.bc.ca/ecwp2/ecw_wms.dll?
> extension=jpg
> layers=BC_BC_BARKBEETLE_XC1M_BCALB_2004
> srs=EPSG:4326
> bbox 
> = 
> -125.68597532095629,52.895690306154634 
> ,-123.19671134658027,54.304065106304094
> 
> The "rules" of WMS client URL construction say that you don't encode  
> the tokenizing characters (& = ?), just like normal, but there are  
> also some special characters that you don't encode when they are used  
> relative to particular parameters:
> / Separator between MIME type and subtype in format parameter value.
> : Separator between Namespace and Identifier in SRS parameter value.
> , Separator between individual values in list-oriented parameters.
> 
> Whoa! Crazyness! But that's the way the spec is written.
> So the ":" in the SRS, shouldn't be encoded.
> Nor should the "/" in the format.
> And note that the "," in the layers and bbox parameters should not be  
> encoded WHEN THEY ARE SEPARATORS.  This presumably allows european use  
> of the comma as a decimal, and the use of commas in layer names, while  
> still using commas as separators.
> 
> This is an issue for strict servers, like the one cited above.

Yep. Shouldn't be too hard for someone to write a patch: I'll take it
when I get one (and keep it in mind to fix at some point).

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Tilecache mailing list