This PR adds new functionality to the ZAP Search API that intakes a projectid and then retrieves and writes the respective geometries (both multipolygon and centroid) to the database. It also allows the front-end to consume the multi-polygon geometries from this project_geoms database table.
Proposed changes:
Updates PLUTO version to v18.2. Current data in project_geoms table is from previous 18.1.1, not 18v2, but future writes will use 18.2. The version gets written to the database along with the geoms.
Adds new routes/projects/update-geometries route which gets list of BBLs for the project, triggers a utlity which retrieves corresponding geoms, and then writes those geoms to the project_geoms table in the database.
Adds new utils/get-project-geoms.js which retrieves geoms and PLUTO version from Carto
Requires API key for routes/projects/update-geometries that is fed in as a query parameter. Ex: .../projects/:projectid/update-geometries?API_KEY=[key]. This approved USER_API_KEY value will need to be set on the .env for deloyment.
Adds to show.sql to pull in multipolygon geoms from project_geoms table
Updates routes/project to format multipolygon geom as a feature collection
Adds subdomain to circle CI config so app will deploy
Adds new script/update-all-geoms.js that can be used to populate the entire project_geoms table at once as needed
This PR adds new functionality to the ZAP Search API that intakes a projectid and then retrieves and writes the respective geometries (both multipolygon and centroid) to the database. It also allows the front-end to consume the multi-polygon geometries from this
project_geoms
database table.Proposed changes:
project_geoms
table is from previous 18.1.1, not 18v2, but future writes will use 18.2. The version gets written to the database along with the geoms.routes/projects/update-geometries
route which gets list of BBLs for the project, triggers a utlity which retrieves corresponding geoms, and then writes those geoms to theproject_geoms
table in the database.utils/get-project-geoms.js
which retrieves geoms and PLUTO version from Cartoroutes/projects/update-geometries
that is fed in as a query parameter. Ex: .../projects/:projectid/update-geometries?API_KEY=[key]. This approved USER_API_KEY value will need to be set on the .env for deloyment.show.sql
to pull in multipolygon geoms fromproject_geoms
tableroutes/project
to format multipolygon geom as a feature collectionscript/update-all-geoms.js
that can be used to populate the entireproject_geoms
table at once as neededCloses #415. Closes #416. Closes #417. (in zap-search repo). Closes #67. Closes #71. Closes #72.