Skip to content

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

@kieranbartels

Description

@kieranbartels

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): LimnoTech#11
USGS follows CF Conventions when creating/managing their datasets: https://cfconventions.org/cf-conventions/cf-conventions.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions