[owslib-devel] wfs 11 and srsname encoding
Jachym Cepicky
jachym.cepicky at gmail.com
Wed Mar 28 15:05:19 PDT 2012
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
--
Jachym Cepicky
Help Service - Remote Sensing s.r.o.
jachym.cepicky at gmail.com | jachym at hsrs.cz
http://les-ejk.cz | http://bnhelp.cz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wfs11-srsname.patch
Type: text/x-patch
Size: 7911 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/owslib-devel/attachments/20120329/48bfb4eb/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.osgeo.org/pipermail/owslib-devel/attachments/20120329/48bfb4eb/attachment.pgp>
More information about the OWSLib-devel
mailing list