NewGraphEnvironment / fish_passage_peace_2023_reporting

https://newgraphenvironment.github.io/fish_passage_peace_2023_reporting/
Creative Commons Zero v1.0 Universal
0 stars 2 forks source link

`form_pscis_20230825.gpkg` wont import with `sf::st_read` #3

Closed NewGraphEnvironment closed 1 year ago

NewGraphEnvironment commented 1 year ago
> test <- sf::st_read('../../gis/form_pscis_20230825.gpkg')
Reading layer `form_pscis' from data source `/Users/airvine/Projects/gis/form_pscis_20230825.gpkg' using driver `GPKG'
Error in CPL_read_ogr(dsn, layer, query, as.character(options), quiet,  : 
  attempt to set index 1/1 in SET_STRING_ELT

same issue as here apparently https://github.com/NewGraphEnvironment/fish_passage_skeena_2022_reporting/issues/5

tried:

this may have to do with renaming the gpkg when it was replaced with a newer version. shouldn't matter but...

NewGraphEnvironment commented 1 year ago

work around for now is to export as geojson as that seems to work

NewGraphEnvironment commented 1 year ago

better workaround is to export the file again and save as another gpkg with a different name (form_pscis_20230825_resaved.gpkg in this case). This avoids issues related to conflicting column types caused by geojson vs gpkg.