Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm assuming the magic is this bit?

https://us-west-2-lambda.kylebarron.dev/usgs-topo/11/335/790...

Which figures out how to return a JPG of that specific 11/335/790 tile.

What's Dynamo DB being used for here?



Yeah pretty much.

The backend needs to 1) find the S3 urls of the relevant images that intersect that XYZ tile index 2) read the relevant portion of each of them (removing the map collar as necessary [0]), and 3) composite them together to minimize areas of missing data.

In this project there's a static, pre-generated index used for 1. Essentially a mapping from tile indexes to an array of URLs. And I use DynamoDB under the hood for that fast key-value lookup. In a more production-ready setup, you'd have a Postgres database in the backend, so that you can handle arbitrary date ranges or other query parameters from the user.

[0]: https://github.com/kylebarron/usgs-topo-tiler#removing-map-c...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: