Skip to content

[WFS 2.0.0] getfeature argument to specify SRS/CRS? #910

@digital-idiot

Description

@digital-idiot

As of version '0.29.2' there is no way to specify CRS/SRS when calling WebFeatureService_2_0_0.getfeature .
See:

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
"""
)

However both in WebFeatureService_1_1_0 and WebFeatureService_1_0_0 have the following parameter to specify SRS:

srsname: string 
             EPSG code to request the data in 

def getfeature(
self,
typename=None,
filter=None,
bbox=None,
featureid=None,
featureversion=None,
propertyname=None,
maxfeatures=None,
srsname=None,
outputFormat=None,
method="Get",
startindex=None,
sortby=None,
):
"""Request and return feature data as a file-like object.
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.
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.
method : string
Qualified name of the HTTP DCP method to use.
srsname: string
EPSG code to request the data in
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 3 different modes of use
1) typename and bbox (simple spatial query). It is assumed, that
bbox coordinates are given *always* in the east,north order
2) typename and filter (more expressive)
3) featureid (direct access to known features)
"""

def getfeature(
self,
typename=None,
filter=None,
bbox=None,
featureid=None,
featureversion=None,
propertyname="*",
maxfeatures=None,
srsname=None,
outputFormat=None,
method="{http://www.opengis.net/wfs}Get",
startindex=None,
):
"""Request and return feature data as a file-like object.
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.
featureid : list
List of unique feature ids (string)
featureversion : string
Default is most recent feature version.
propertyname : list
List of feature property names. '*' matches all.
maxfeatures : int
Maximum number of features to be returned.
method : string
Qualified name of the HTTP DCP method to use.
srsname: string
EPSG code to request the data in
outputFormat: string (optional)
Requested response format of the request.
startindex: int (optional)
Start position to return feature set (paging in combination with maxfeatures)
There are 3 different modes of use
1) typename and bbox (simple spatial query)
2) typename and filter (more expressive)
3) featureid (direct access to known features)
"""

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions