Another attempt at writing the river flow algorithm focused on visualizations
- Pixels with colour for height
- Swap to graph
- Visualise merging equal height nodes by moving them to the centre point then changing them into one point
- Flooding
- BFS
- Sort
- Creation of linked list
- Flow simulation
- Create virtual environment
virtualenv -p python3.7 venv
- Install required packages
pip install -r requirements.txt
cd pygame
python renderer.py
- Press right arrow key to advance
- During some steps use the mouse to interact
- Press ESC at any time to exit
- Download sentinel tile.
- Download aster dem tile.
- Load both datasets in SNAP desktop. They should have enough info to load into the world view. If they don't fix up the source data.
- Resample the sentinel image. Raster > Geometric Operations > Resampling
- Colocate the images. Make sure the master is the sentinel image. Don't select nearest neighbour. Bicubic interpolation worked well last time.
- Subset the image (do this to crop the image and select only the elevation correct band).
- Export this as a GeoTiff.
- Go back to the sentinel tile. Create an RGB image (with sentinel RGB values) and then export view as image. This should give you accurate colours.
- If the images don't overlap correctly you will need to subset when you export probably.
- Download sentinel 2 tiles. Optimise for complete tiles (no black areas), time of day (no shadows), then cloud cover. Use the EarthExplorer website.
- Download dem files from Alaska Satellite Facility.
- Load all files in qgis. Use the merge tool to create two large tifs of the area selected. One 1hould be the height map and one should be the true colour image.
- Use the align raster tool to align the dem with the sentinel image. Make sure the images have the same pixel size, and same height/width afterwards. If required adjust the area bounds to make sure the height/width are correct.