[owslib-devel] wfs 11 and srsname encoding

Dominic Lowe dominic.lowe at stfc.ac.uk
Fri Mar 30 03:17:39 PDT 2012


Hi Jachym,

I haven't tested the patch, but just to check my understanding:

I'm interpreting from the examples that the purpose of the fifth 
parameter is to specify the CRS used for the bounding box? Is that correct?
If so does this mean you can make a request in one CRS (using the fifth 
parameter) and request the response is delivered in another (using the 
'srsName')?

(Is this supported by WFS 1.1.0? I have seen the concept of request and 
response CRS in some OGC specs - can't remember which offhand now).

Cheers,
Dom


On 29/03/12 01:05, jachym.cepicky at gmail.com wrote:
> Hi,
>
> according to my last email, I'm attaching patch to this topic.
>
> The patch fill do format propper getfeature request for WFS 1.1.0 server:
>
> 1) It will always add 5th parameter to bbox (if not given) in the format
> supported by the server
> 2) Always format srsname parameter in the format supported by the server
> 3) Assume, bbox coordinate are given in the east,north axis order and
> re-order them in a case, this is needed.
> 4) Check, if the srsname given as parameter input is supported by the
> server and select the proper form for it (code or urn)
>
> examples:
>
>>>> from owslib.wfs import WebFeatureService as WFS
>>>> w = WFS("http://bnhelp.cz/ows/crwfs",version="1.1.0")
> Example 1:
>>>> f = w.getfeature("okresy",srsname="epsg:4326")
> will produce URL "....typename=okresy&srsname=urn:ogc:def:crs::4326"
>
> because of "epsg:4326" is not supported by the server, but the URN form is
>
> Example 2:
>>>> f = w.getfeature("okresy",srsname="epsg:4326",bbox=[14,49,17,51])
> will produce
> "....typename=okresy&srsname=urn:ogc:def:crs::4326&bbox=49,14,51,17,urn:ogc:def:crs::4326"
>
> It will take the default SRS (in propper form) for given feature type
> and re-order bbox coordinates according to it
>
> Example 3:
> f =
> w.getfeature("okresy",srsname="epsg:4326",bbox=[14,49,17,51,'epsg:4326'])
>
> will produce the same as above
>
> Any comments?
>
> Jachym
>

-- 
Scanned by iCritical.




More information about the OWSLib-devel mailing list