[Tilecache] WMS (il)legal URLS

Paul Ramsey pramsey at refractions.net
Thu Jan 17 16:40:14 EST 2008


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.

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.



More information about the Tilecache mailing list