Skip to content

Commit

Permalink
Add srsname to wfs200.py getfeature GET request - not added to the PO…
Browse files Browse the repository at this point in the history
…ST request (same behaviour as wfs110.py implementation)
  • Loading branch information
lpartington committed Sep 30, 2024
1 parent d932a6b commit 6ffe026
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions owslib/feature/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ def getGETGetFeatureRequest(
featureversion=None,
propertyname=None,
maxfeatures=None,
srsname=None,
storedQueryID=None,
storedQueryParams=None,
outputFormat=None,
Expand All @@ -183,6 +184,8 @@ def getGETGetFeatureRequest(
List of feature property names. '*' matches all.
maxfeatures : int
Maximum number of features to be returned.
srsname: string
EPSG code to request the data in
method : string
Qualified name of the HTTP DCP method to use.
outputFormat: string (optional)
Expand Down Expand Up @@ -239,6 +242,13 @@ def getGETGetFeatureRequest(
request["count"] = str(maxfeatures)
else:
request["maxfeatures"] = str(maxfeatures)
if srsname:
request["srsname"] = str(srsname)

# Check if desired SRS is supported by the service for each
# typename. Warning will be thrown if that SRS is not allowed.
for name in typename:
_ = self.getSRS(srsname, name)
if startindex:
request["startindex"] = str(startindex)
if storedQueryID:
Expand Down
4 changes: 4 additions & 0 deletions owslib/feature/wfs200.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ def getfeature(
featureversion=None,
propertyname=None,
maxfeatures=None,
srsname=None,
storedQueryID=None,
storedQueryParams=None,
method="Get",
Expand Down Expand Up @@ -254,6 +255,8 @@ def getfeature(
For Post request, leave blank (None) to get all properties.
maxfeatures : int
Maximum number of features to be returned.
srsname: string
EPSG code to request the data in
storedQueryID : string
A name identifying a prepared set available in WFS-service
storedQueryParams : dict
Expand Down Expand Up @@ -298,6 +301,7 @@ def getfeature(
featureversion,
propertyname,
maxfeatures,
srsname,
storedQueryID,
storedQueryParams,
outputFormat,
Expand Down

0 comments on commit 6ffe026

Please sign in to comment.