Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
digital-idiot opened this issue Mar 9, 2024 · 3 comments
Closed

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

digital-idiot opened this issue Mar 9, 2024 · 3 comments

Comments

@digital-idiot
Copy link

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

@digital-idiot digital-idiot changed the title [WFS 2.0.0] getfeature parameter to specify srs/ces? [WFS 2.0.0] getfeature argument to specify srs/ces? Mar 9, 2024
@digital-idiot digital-idiot changed the title [WFS 2.0.0] getfeature argument to specify srs/ces? [WFS 2.0.0] getfeature argument to specify SRS/CRS? Mar 9, 2024
@jnicho02
Copy link

ditto #905

@lukas-paulun
Copy link

I would also be interested in an answer to that question

@geographika
Copy link
Contributor

Fixed with #945

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants