pygeoapi icon indicating copy to clipboard operation
pygeoapi copied to clipboard

Position query UI breaks due to non-spatiotemporal parameters being treated as parameters

Open kieranbartels opened this issue 2 months ago • 1 comments

Description

When performing position queries on datasets that include non-spatiotemporal parameters (e.g., crs, lat_bounds, or other auxiliary variables), pygeoapi incorrectly interprets these variables as queryable parameters.

As a result:

  1. pygeoapi attempts to collect timeseries data for parameters like crs, which do not contain actual geospatial/temporal values.
  2. The position UI popup fails to render, showing a blank panel.
  3. In the collection Parameters table, these non-queryable metadata fields appear with "None" values for name and units

Filtering out non-geospatial parameters resolves the UI issue and produces a correct parameter list and query result.


Steps to Reproduce

  1. Use a dataset containing parameters such as crs, lat_bounds, etc.
    Example: PRISM dataset at USGS.

  2. Run a position query:
    https://api.water.usgs.gov/gdp/pygeoapi/collections/PRISM/position?coords=POINT(-92.97663954153481 32.92670592660468)

  3. Note:

  • The JSON response contains valid data for all variables.
  • The position UI popup remains empty.
  1. If all valid geospatial parameters are explicitly provided: &parameter-name=ppt,tmn,tmx, the UI works correctly.

  2. Inspect the Parameters list for the collection and note the presence of non-geospatial parameters (crs, lat_bounds, etc.) with "None" values.
    https://api.water.usgs.gov/gdp/pygeoapi/collections/PRISM
    https://api.water.usgs.gov/gdp/pygeoapi/collections/GMO_New


Expected behavior

  • pygeoapi should ignore non-geospatial parameters such as crs, lat_bounds, and other auxiliary dataset fields.
  • Only true spatial/temporal queryable variables should:
    • Appear in the Parameters table.
    • Be used by the position query.

Screenshots/Tracebacks

Broken UI when CRS is present:

Image

Non geospatial fields in the Parameters table

Image

Working UI when non geospatial fields are removed/filtered out:

Image

Environment

  • OS: (Windows 11)
  • Python version: (>=3.10,<=3.12)
  • pygeoapi version: (master)

Additional context

Original USGS UI Bug Issue: https://code.usgs.gov/wma/nhgf/pygeoapi/-/issues/65 LimnoTech Issue (and fix): https://github.com/LimnoTech/pygeoapi/pull/11 USGS follows CF Conventions when creating/managing their datasets: https://cfconventions.org/cf-conventions/cf-conventions.html

kieranbartels avatar Nov 21 '25 15:11 kieranbartels

@tomkralidis any insight on this issue? The temporary fix I made works on our LimnoTech fork of Pygeoapi for USGS, but we would love to just be able to point to the main Geopython branch if possible.

kieranbartels avatar Dec 09 '25 20:12 kieranbartels