Closed chriswhong closed 5 years ago
don't forget to rebase & squash before merging !!! and maybe for posterity edit the PR description to describe what it actually does now :)
This is really hard to setup for local development. Let's get some of these dependencies Dockerized so it's easier to setup fresh!
Two things:
@chriswhong blah, I need help: https://circleci.com/docs/2.0/building-docker-images/
Adds two new endpoints under
/projects
:/download/shp
- Downloads a zipped shapefile of all matching projects with their polygons as the geometry./download/geojson
- Downloads a geojson FeatureCollection of all matching projects with their polygons as the geometry.Each takes the same query params as
/projects
(except for pagination), so the frontend implementation should be to build out a button that hyperlinks to the above endpoints, adding the same query params that are currently in effect in the ZAP Search filter view.Because shapefile creation depends on
ogr2ogr
, this PR also adds a Dockerfile. This Dockerfile will be used by dokku to ensure that GDAL (and ogr2ogr) is available in the container this API will run in.I tested this Dockerfile in a dummy dokku app and it worked, but I didn't test everything manually. We should take care to watch the deployment closely once this gets pushed.
TODO:
/projects.{fileextension}
routes/projects/index.html
so it's not so crazy.