Closed nesdolya closed 4 months ago
Changes have been made to the branch: https://github.com/cat-cfs/twobilliontoolkit/tree/BufferBuilder-Processing-Reported-Points
All requirements have been completed and I have tried to catch some edge cases while updating/inserting into the database so hopefully didn't miss any!
Tested and functioning
One of the first processing steps required for the 2BT spatial data processing workflow is 'spatializing' the latitude and longitude reported in the aspatial data. I have a hardcoded script that takes in an excel/csv and generates three spatial layers in a GDB: (1) lat/lon points in WGS84 (4326), (2) lat/lon points reprojected to Canada Albers Equal Area (102001), & (3) these points buffered to a circle that represents the reported planting area. Output 2 and 3 need to be added to the PostgreSQL DB.
Please utilize the existing script/tool and modify it (or recreate it) to ensure that these output are correctly stored in the PostgreSQL DB. And, modify the PostgreSQL schema to include mechanisms for version control of the site_points and site_buffered_points tables, specified below.
The most recent version of the existing tool is located here: \vic-fas1\projects_a\2BT\02_Tools\spatial_data_processing_workflow\create_buffered_points_2023DRAFT_v2.py Additional ArcPy class scripts used in the above tool are located: \vic-fas1\projects_a\2BT\02_Tools\spatialArcpyUtils
Checking for updates/changes to the existing data can either be done through Python or PostgreSQL trigger functions - whichever you are more familiar with.
Processing Steps:
GeoPandas (GPD) Implementation (will likely be simpler b/c no intermediate datasets need to be stored locally):
Requirements:
PostgreSQL Schema modifications required: