Skip to content

Commit

Permalink
update RFC5
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Jan 15, 2025
1 parent 99d7678 commit ac2eb2e
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions docs/development/rfc/5.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ title: RFC5 - Enhanced data limit handling
- author: Tom Kralidis
- contact: [email protected]
- status: draft
- modified: 2024-12-30
- modified: 2025-01-14

## Overview

Expand All @@ -27,19 +27,20 @@ pygeoapi will define a `limits` configuration parameter that will allow a user t

```yaml
limits:
defaultitems: 10 # applies to vector data
maxitems: 500 # applies to vector data
maxdistance: [x, y] # applies to all datasets
units: m # as per UCUM https://ucum.org/ucum#section-Tables-of-Terminal-Symbols
items_default: 10 # applies to vector data
items_max: 500 # applies to vector data
max_distance_x: 123 # applies to all datasets
max_distance_y: 456 # applies to all datasets
max_distance_units: m # as per UCUM https://ucum.org/ucum#section-Tables-of-Terminal-Symbols
on_exceed: error # one of error, throttle
```
The `limits` setting will be applied as follows:

- pygeoapi administrator is able to use at both the `server` and `resources` levels, with `resources` limits overriding server wide `limits` settings
- no limit specified by client: use `limits.defaultitems` to set the result set size
- limit specified by client: calculate the minimum of the query parameter and `limits.maxitems` to set the result set size
- bbox or spatial dimensions: compare distance of request to maximum definition allowed in `limits.maxdistance`
- no limit specified by client: use `limits.items_default` to set the result set size
- limit specified by client: calculate the minimum of the query parameter and `limits.items_max` to set the result set size
- bbox or spatial dimensions: compare distance of request to maximum definition allowed in `limits.max_distance_x` and `limits.max_distance_y`

## Implementation

Expand All @@ -66,4 +67,4 @@ Pull Request: <https://github.com/geopython/pygeoapi/pull/1892>

## Voting History

TBD
Adopted on 2025-01-14 with +1 from jorgejesus, tomkralidis, kalxas

0 comments on commit ac2eb2e

Please sign in to comment.