4 ms·
Do you know of any tutorials on how to generate and host own (raster) tiles?
by spython 7y ago
Do you know of any tutorials on how to generate and host own (raster) tiles?
- lbutler 7y agoI would suggest starting with something static if you're just starting out. Best way to get a feel for how it works without having to worry about setting up a spatial database. I used this article myself to learn: https://geovation.github.io/build-your-own-static-vector-tile-pipeline https://geovation.github.io/build-your-own-static-vector-til... There are a couple more articles at the bottom of the awesome vector tiles I linked to before but haven't read them myself. Reading through the list is good as well because it's a good overview of the whole ecosystem. Edit: This article also shows a simple way to dynamically serve vector tiles directly from PostGIS. I didn't realise you could do it without the middlewear, time to look into doing it this way! https://medium.com/nyc-planning-digital/using-the-new-mvt-function-in-postgis-75f8addc1d68 https://medium.com/nyc-planning-digital/using-the-new-mvt-fu...
- spython 7y agoThanks for the explanation on the vector maps! Do you also happen to know how to get started on raster maps, e.g. where to get satellite imagery, prepare and host the tiles? I am currently interested in it because I want to feed tiles to a GAN to automatically generate maps of an imaginary earth..
- jofer 7y agoTiling and hosting is the straightforward part, FWIW. For the reprojection, tile cutting, and overview building in gdal, see https://gdal.org/programs/gdal2tiles.html https://gdal.org/programs/gdal2tiles.html You can also implement it yourself fairly easily if gdal2tiles.py doesn't have the features you need. The files and directory structure it outputs you can slap into into a static webserver and visualize directly with something like leaflet. As far as where to get data, that's a whole topic unto itself, but you can start with things like https://earthexplorer.usgs.gov/ https://earthexplorer.usgs.gov/ for Landsat or https://datagateway.nrcs.usda.gov/ https://datagateway.nrcs.usda.gov/ for NAIP or https://scihub.copernicus.eu/ https://scihub.copernicus.eu/ for Sentinel.
- kylebarron 7y agoI haven't implemented it yet, but [0] looks like a great, detailed tutorial for serving tiles from S3. The article talks about vector tiles, but it should work with raster tiles that you save as .PNG in the same directory structure. [0]: https://github.com/addresscloud/serverless-tiles https://github.com/addresscloud/serverless-tiles