Skip to content

Commit

Permalink
Merge pull request #806 from geopython/oacov-properties
Browse files Browse the repository at this point in the history
OACov: s/range-subset/properties
  • Loading branch information
kalxas committed Mar 10, 2022
2 parents c12ec26 + b83ea1f commit ff09beb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions owslib/ogcapi/coverages.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ def coverage(self, collection_id: str, **kwargs: dict) -> dict:
@type collection_id: string
@param collection_id: id of collection
@type range_subset: list
@param range_subset: range subset
@type properties: list
@param properties: range subset
@type subset: list of tuples
@param subset: [(name, lower bound, upper bound)]
@type scale_size: list of tuples
Expand All @@ -89,9 +89,9 @@ def coverage(self, collection_id: str, **kwargs: dict) -> dict:

kwargs_ = {}

if 'range_subset' in kwargs:
kwargs_['range-subset'] = ','.join(
[str(x) for x in kwargs['range_subset']])
if 'properties' in kwargs:
kwargs_['properties'] = ','.join(
[str(x) for x in kwargs['properties']])

for p in ['scale_axes', 'scale_size', 'subset']:
if p in kwargs:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ogcapi_coverages_pygeoapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ def test_ogcapi_coverages_pygeoapi():
assert rangetype['field'][0]['definition'] == 'float64'

with pytest.raises(RuntimeError):
w.coverage('gdps-temperature', range_subset=[8])
w.coverage('gdps-temperature', properties=[8])

0 comments on commit ff09beb

Please sign in to comment.