azavea / tilegarden

Serverless raster and vector map tile generation using Mapnik and AWS Lambda
https://azavea.github.io/tilegarden/
Other
98 stars 7 forks source link

Feature/tiling demo #23

Closed mattdelsordo closed 6 years ago

mattdelsordo commented 6 years ago

Overview

This PR plugs mapnik into the database in order to generate map tiles, which then get served up through an API.

Demo

Example deployment (27 Jun 2018) image image

Notes

Current development environment setup doesn't necessarily obey the quirks of the real API Gateway, tiles are served from what is basically an express server. Also, the pwd_inlets data set is very large on a per-tile basis which may cause the lambdas to time out. Increase the value of TIMEOUT in .env if you are consistently getting un-viewable images or 502 errors.

Accept headers

API Gateway currently has issues serving images that can be simply displayed in-browser, so you have to manually add an Accept:image/png header to your lambda requests to receive proper images. This can be done either with curl (-H "Accept:image/png") or in production by setting up a proxy (e.g. with CloudFront) that adds the header to all lambda requests.

Testing Instructions

Resolves #10, resolves #19, resolves #31, resolves #32

KlaasH commented 6 years ago

This currently has demo files for both pa_gardens and pwd_inlets. I think it would make sense to pick one to get working and leave the other out of the repo for now. My feeling is that using pa_gardens, since it's simpler, is preferable for the initial demo. That would also mean we could remove the inlet filtering from node-lambnik, which I think makes sense since that's very specific to the original Lambnik demo and might not match where we ultimately want to go with filtering config.