NewGraphEnvironment / dff-2022

Building digital field forms and processing data collected using R, postgresql, QGIS and other tools
Creative Commons Zero v1.0 Universal
0 stars 3 forks source link

need hack to sub in the streams and crossings using R direct from PG or ogr2ogr when fdb files not updated but vm db is #141

Closed NewGraphEnvironment closed 9 months ago

NewGraphEnvironment commented 9 months ago

if fdbs are not updated but database is we can survive for the time being

would be better to ogr2ogr but we do not always have access to the VM.

maybe bcfishpass_viewer would have worked for ogr2ogr. This might be a good spot to put the code.

Deleting layer `streams' using driver `GPKG'
Writing layer `streams' to data source `scripts/qgis/background_layers.gpkg' using driver `GPKG'
Writing 271116 features with 47 fields and geometry type 3D Measured Line String.
Warning message:
In clean_columns(as.data.frame(obj), factorsAsCharacter) :
  Dropping column(s) wscode_ltree,localcode_ltree,barriers_anthropogenic_dnstr,barriers_pscis_dnstr,barriers_dams_dnstr,barriers_dams_hydro_dnstr,barriers_bt_dnstr,barriers_ch_cm_co_pk_sk_dnstr,barriers_ct_dv_rb_dnstr,barriers_st_dnstr,barriers_wct_dnstr,crossings_dnstr,obsrvtn_event_upstr,obsrvtn_species_codes_upstr,species_codes_dnstr of class(es) pq_ltree,pq_ltree,pq__text,pq__text,pq__text,pq__text,pq__text,pq__text,pq__text,pq__text,pq__text,pq__text,pq__int8,pq__text,pq__text
Deleting layer `crossings' using driver `GPKG'
Writing layer `crossings' to data source `scripts/qgis/background_layers.gpkg' using driver `GPKG'
Writing 32013 features with 199 fields and geometry type 3D Measured Point.
Warning message:
In clean_columns(as.data.frame(obj), factorsAsCharacter) :
  Dropping column(s) modelled_crossing_type_source,wscode_ltree,localcode_ltree,observedspp_dnstr,observedspp_upstr,crossings_dnstr,barriers_anthropogenic_dnstr,barriers_anthropogenic_upstr,barriers_bt_dnstr,barriers_ch_cm_co_pk_sk_dnstr,barriers_st_dnstr,barriers_wct_dnstr of class(es) pq__text,pq_ltree,pq_ltree,pq__text,pq__text,pq__text,pq__text,pq__text,pq__text,pq__text,pq__text,pq__text
smnorris commented 9 months ago

Yes, you can use ogr2ogr locally. Looking in to why the updates are not reflected in the files.