-
-
Notifications
You must be signed in to change notification settings - Fork 304
Description
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:
- pygeoapi attempts to collect timeseries data for parameters like
crs, which do not contain actual geospatial/temporal values. - The position UI popup fails to render, showing a blank panel.
- 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
-
Use a dataset containing parameters such as
crs,lat_bounds, etc.
Example: PRISM dataset at USGS. -
Run a position query:
https://api.water.usgs.gov/gdp/pygeoapi/collections/PRISM/position?coords=POINT(-92.97663954153481 32.92670592660468) -
Note:
- The JSON response contains valid data for all variables.
- The position UI popup remains empty.
-
If all valid geospatial parameters are explicitly provided:
¶meter-name=ppt,tmn,tmx, the UI works correctly. -
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:
Non geospatial fields in the Parameters table
Working UI when non geospatial fields are removed/filtered out:
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