RFC5: apply distance limiting#2229
Open
tomkralidis wants to merge 1 commit into
Open
Conversation
74982b1 to
a78997b
Compare
a78997b to
e4a639a
Compare
e4a639a to
091e992
Compare
webb-ben
reviewed
Jun 1, 2026
| return True | ||
|
|
||
| if max_distance_x is not None: | ||
| requested_distance_x = abs(request_bbox[2] - request_bbox[0]) |
Member
There was a problem hiding this comment.
It might be worth establishing the unit for distance. This as a simple comparison makes some sense when max_distance_units are degrees and the bbox is in OGC:CRS84. However if the bbox is in EPSG:3857, the effective limit would be much smaller.
| server_limits = api.config['server'].get('limits', {}) | ||
| collection_limits = api.config['resources'][dataset].get('limits', {}) # noqa | ||
|
|
||
| _ = evaluate_limit_distance(request.params.get('bbox', []), |
Member
There was a problem hiding this comment.
Related to previous comment, might be worth transforming the bbox to WGS84 here until the unit is applied?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR applies distance limiting per RFC5 for items and coverages.
Related Issue / discussion
https://pygeoapi.io/development/rfc/5
Additional information
Dependency policy (RFC2)
Updates to public demo
Contributions and licensing
(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)