Skip to content

Don't generate paging links if provider created them #1982

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mikemahoney218-usgs
Copy link
Contributor

@mikemahoney218-usgs mikemahoney218-usgs commented Mar 27, 2025

Overview

This PR changes itemtypes.py to allow providers to generate their own 'next' links, which then disable the limit-offset paging built into pygeoapi. As discussed in #1981, we want to move away from limit-offset paging for the data we're serving from Postgres and move towards keyset paging instead, and I believe this change would let us handle that from within our provider.

We just check for a next link in the response before disabling the generation of both prev and next links, as the Features standard mentions that prev links may be skipped based on implementation. As such, if the provider has generated a next link but not a prev link, we assume that was intentional.

Related Issue / discussion

Closes #1981

Additional information

Dependency policy (RFC2)

  • I have ensured that this PR meets RFC2 requirements

Updates to public demo

Contributions and licensing

(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)

  • I'd like to contribute [feature X|bugfix Y|docs|something else] to pygeoapi. I confirm that my contributions to pygeoapi will be compatible with the pygeoapi license guidelines at the time of contribution
  • I have already previously agreed to the pygeoapi Contributions and Licensing Guidelines

@mikemahoney218-usgs
Copy link
Contributor Author

I wanted to bump this to see if there's any interest in the PR! We're trying to determine now if we'll need to post-process the response object somehow, or if this change will let us handle things entirely in the provider.

@webb-ben webb-ben requested a review from a team April 22, 2025 13:51
@webb-ben webb-ben added enhancement New feature or request OGC API - Features OGC API - Features labels Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request OGC API - Features OGC API - Features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Let providers handle paging links to enable other paging methods
2 participants