|
def getfeature( |
|
self, |
|
typename=None, |
|
filter=None, |
|
bbox=None, |
|
featureid=None, |
|
featureversion=None, |
|
propertyname=None, |
|
maxfeatures=None, |
|
storedQueryID=None, |
|
storedQueryParams=None, |
|
method="Get", |
|
outputFormat=None, |
|
startindex=None, |
|
sortby=None, |
|
): |
|
"""Request and return feature data as a file-like object. |
|
|
|
#TODO: NOTE: have changed property name from ['*'] to None - check the use of this in WFS 2.0 |
|
|
|
Parameters |
|
---------- |
|
typename : list |
|
List of typenames (string) |
|
filter : string |
|
XML-encoded OGC filter expression. |
|
bbox : tuple |
|
(left, bottom, right, top) in the feature type's coordinates == (minx, miny, maxx, maxy) |
|
featureid : list |
|
List of unique feature ids (string) |
|
featureversion : string |
|
Default is most recent feature version. |
|
propertyname : list |
|
List of feature property names. For Get request, '*' matches all. |
|
For Post request, leave blank (None) to get all properties. |
|
maxfeatures : int |
|
Maximum number of features to be returned. |
|
storedQueryID : string |
|
A name identifying a prepared set available in WFS-service |
|
storedQueryParams : dict |
|
Variable amount of extra information sent to server related to |
|
storedQueryID to further define the requested data |
|
{'parameter_name': parameter_value} |
|
method : string |
|
Qualified name of the HTTP DCP method to use. |
|
outputFormat: string (optional) |
|
Requested response format of the request. |
|
startindex: int (optional) |
|
Start position to return feature set (paging in combination with maxfeatures) |
|
sortby: list (optional) |
|
List of property names whose values should be used to order |
|
(upon presentation) the set of feature instances that |
|
satify the query. |
|
|
|
There are 5 different modes of use |
|
|
|
1) typename and bbox (simple spatial query) |
|
2) typename and filter (==query) (more expressive) |
|
3) featureid (direct access to known features) |
|
4) storedQueryID and optional storedQueryParams |
|
5) filter only via Post method |
|
|
|
Raises: |
|
ServiceException: If there is an error during the request |
|
|
|
Returns: |
|
BytesIO -- Data returned from the service as a file-like object |
|
""" |
As of version
'0.29.2'there is no way to specify CRS/SRS when callingWebFeatureService_2_0_0.getfeature.See:
OWSLib/owslib/feature/wfs200.py
Lines 220 to 287 in f8e3ff6
However both in
WebFeatureService_1_1_0andWebFeatureService_1_0_0have the following parameter to specify SRS:OWSLib/owslib/feature/wfs110.py
Lines 216 to 269 in f8e3ff6
OWSLib/owslib/feature/wfs100.py
Lines 208 to 255 in f8e3ff6