-
Notifications
You must be signed in to change notification settings - Fork 11
Updating Cluster Zone Shapes
zaven edited this page Oct 15, 2020
·
7 revisions
- Create desired cluster shape features in QGIS
- Use field calculator create and save a unique, serial column called 'gid' based on row number
- Export the shapefile as a postgres SQL file
- Check that gid field is exported
- IMPORTANT: set 'geometry name' parameter to 'geom'
- IMPORTANT: set 'schema' parameter to 'import'
- Use a modified version of update_region.sh to process and load this SQL file into local postgres/postgis
- View the locally running version of the treetracker web map to assess cluster regions
- Create desired cluster shape features in QGIS
- Decided if you want to backed up database locally so you have a restore point
- Save shapefile from QGIS into postgis as new table in import schema
- Drop temporary table if already exists for this database session
- Copy new table to temporary table and prepare that data
- Insert or check that region type exists
- Delete existing region data if necessary
- Insert regions, update centroids, insert zoom levels
- Rebuild tree region data
- Refresh materialized view
After determining that cluster shape features work well locally, export the shape files and store them on github
- Somehow we get the pgsql dump of our new shapefile
- File type is '??'
- CRS is EPSG:4326
- Filename is going to be {descriptive_text}zoom_levels{zoom levels this is for}.pgsql
- tar and gzip this file into an archive
- tar -cvzf {filename}.pgsql.tar.gz {filename}.pgsq
- upload this file into github
- upload a tar.gz of the shapefile source itself