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

OACov: s/range-subset/properties #806

Merged
merged 1 commit into from
Mar 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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])