NYCPlanning / deprecated-labs-zap-api

Deprecated version of the ZAP API, see https://github.com/NYCPlanning/labs-zap-api
Other
5 stars 3 forks source link

144: fix geom creation issue #216

Closed hannahkates closed 5 years ago

hannahkates commented 5 years ago

For the past two months, our API has been failing to write geometry data to the project_geoms table. This has been happening because the trigger function that was created to create Web Mercator (SRID 3857) copies of the geoms was preventing new projects rows from being inserted into project_geoms. To solve this, @allthesignals and I deleted the finicky trigger functions.

In this PR, I've added to the Carto SQL query to get Web Mercator (SRID 3857) geoms directly from Carto, instead of needing to create the transformed geoms in our database upon UPDATE/INSERT using a trigger function.

This PR also

Addresses #144