Update facilities tableDevelop update Facilities DB from reviewed geopackage #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Upload reviewed gpkg to the temp_facilities table in the database
Update facilities table
copy of symlink the update_facilities folder of the repo to your plugin directory in qgis, I used ln -s ~/dev/nz-facilities/update_facilities/ ~/.local/share/QGIS/QGIS3/profiles/default/python/plugins
create the config
the plugin connects to db via a config file. This file is autogenerated if it doesn't exist but user will need to find and update the link to the database.
then navigate to the update_facilities folder and select the config.ini file
I suggest you create a test db to connect to, this is the dump file I was using and the command used on ubuntu to restore it
https://linzsrm.sharepoint.com/:u:/s/Topography/ES9g9Rysll5IpQEPoyBG2Q0BXP3iYNAu8_quettsfsjoXg?e=eI2N8l
pg_restore -h localhost -p 5432 -d facilities_test_db -U postgres -O -v -x --no-table-access-method "/home/pking/dev/nz-facilities/change_detection/facilities_dump/facilities.backup"
you will need to add the logging tables and update the temp_facilities table, there is an sql file with some quick code to do this in the sharepoint folder mentioned above
I have also put test data and an output from the facilities script in the share point