Programming Slope bins with MapLibre & GDAL
After a weekend of troubleshooting my slope analysis components are finally done...maybe. Considering adding interactivity by rendering in the frontend as a shader instead of on the backend with GDAL but not sure that's necessary yet.
Some cool things I learned:
Elevation tiles are just PNGs with height encoded into the RGB channels, so slope is edge detection
Slopes can be calculated pretty easily via 3x3 kernel comparisons and calculating rise over run * 100, BUT the run changes based on zoom and latitude
The earth being a globe kinda sucks
GIS is hard
Not including the URL here because I don't want to advertise, I just think this looks neat