Here you can find some code examples of my exploration of Tyler Morgan-Wall's amazing rayshader package for R. My approach was heavily inspired by Will Bishop's blog post I can rayshade, and so can you.
Creating a 3-dimensional image of my favourite ski holiday destination Adelboden.
- We download the latest shapefiles of the municipal boundaries from the website of the Swiss Federal Statistical Office.
- We access different types of elevation data: SRTM 90m and SRTM 30m of NASA's Shuttle Radar Topography Mission and we create an even more fine-grained elevation model (10m) with Google's Elevation API (5 USD per 1000 requests, total costs of ~ 25 USD).
- We use rayshader for a three-dimensional spatial visualization of Adelboden's 88,2 km2.
- We download a suitable aerial image via the ArcGIS REST API using Will Bishop's
get_arcgis_map_image
function. - We printscreen an arial image from the map of the Swiss Federal Geoportal, assign it georeferences and crop it to the appropriate size.
- We overlay the rayshaded 3D visualizations with the aerial images.
- We add georeferenced labels and render a video of the scenery.
And...it's a wrap!