smnorris / bcdata

Python and command line tools for quick access to DataBC geo-data available via WFS/WCS.
MIT License
29 stars 7 forks source link

WHSE_ADMIN_BOUNDARIES.ADM_NR_DISTRICTS_SPG #200

Closed smnorris closed 1 week ago

smnorris commented 1 week ago

No schema is found for this table:

$ bcdata info WHSE_ADMIN_BOUNDARIES.ADM_NR_DISTRICTS_SPG
2024-11-12 14:22:27,035:WARNING:bcdata.bcdc: BC Data Catalouge API search provides no schema for: WHSE_ADMIN_BOUNDARIES.ADM_NR_DISTRICTS_SPG
{"description": "The spatial representation for a Natural Resource (NR) District, that is an administrative area established by the Ministry, within NR Regions.", "comments": null, "schema": [], "primary_key": null, "name": "WHSE_ADMIN_BOUNDARIES.ADM_NR_DISTRICTS_SPG", "count": 23}

Searching the api for this table there are three resources associated with the single result, two of which are ["bcdc_type"] == "geographic". The first resource has ["object_name"] = WHSE_ADMIN_BOUNDARIES.ADM_NR_DISTRICTS_SP, so the details/schema are not recognized as the name does not match (missing the final characterG). The third resource does not contain schema details.

Must the object name always match the table name? Are there other instances where it does not? This seems to be a new bug, the data has been successfully loaded to bcfishpass previously.

smnorris commented 1 week ago

This behaviour matches the resources shown in the web interface - https://catalogue.data.gov.bc.ca/dataset/natural-resource-nr-district - the custom download resource has the correct object name.

It seems the issue is more that there is no result for WHSE_ADMIN_BOUNDARIES.ADM_NR_DISTRICTS_SP, the layer that we want (presuming that G stands for the generalized resource, which is not downloadable).