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

bc2pg ddl, record geometry type #177

Open smnorris opened 4 months ago

smnorris commented 4 months ago

An empty table can be created fairly quickly with bcdata bc2pg -e -c 1 <dataset>, but this still takes a bit of time to round-trip from WFS. For automated testing and generation of db setup scripts, a bc2pg option for emitting only create table SQL would be useful (rather than creating the empty table).

The table is defined by the catalogue api - apart from the geometry type. If we record known geometry types the request to WFS should not be required for defining the table / generating sql.

smnorris commented 4 months ago

Modify/rename this file to include geometry type as well as PK: https://github.com/smnorris/bcdata/blob/main/data/primary_keys.json