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

convert column names to lower case when writing layers using `bcdata dump` to `geojson` then to `gpkg` with `ogr2ogr` #70

Closed NewGraphEnvironment closed 1 year ago

NewGraphEnvironment commented 1 year ago

this looks like a very promising start. Particularly if we can capture the ogrinfo regarding all the column names and assign as variable

https://gist.github.com/capooti/f1f272eeefc1ceb89007

NewGraphEnvironment commented 1 year ago

looks like bc2pg does it here with python https://github.com/NewGraphEnvironment/bcdata/blob/e818f42fa25b82340d6c97fbdc860c12bb27c170/bcdata/bc2pg.py#L96

smnorris commented 1 year ago

Yes. And I think it would be a reasonable option (or even default) to add to bcdata.get_data() etc. The upper case columns are annoying.

NewGraphEnvironment commented 1 year ago

https://github.com/smnorris/bcdata/issues/126

NewGraphEnvironment commented 1 year ago

looks like ogr2ogr converts the lowercase names in the geojsons to uppercase when it burns to the geopackage... annoying

will try -lco LAUNDER=YES but not sure that will work with gpkg driver

NewGraphEnvironment commented 1 year ago

actually - the -l flag on good old bcdata worked fine. was a qlr issue (not in project directory when dragged in that caused the issue)