Blink comparison of satellite imagery
Requirements:
- rasterio
- pyproj
- numpy
- matplotlib
- Install miniconda (https://docs.conda.io/en/latest/miniconda.html). Choose the 64-bit Python 3.8 or 3.9 and the appropriate operating system. Follow the instructions to create a base environment and activate it. Make sure you install conda in a location where you have permissions to read and update the packages.
- Create a new conda environment. Lets call it
geotiff
.conda create -name geotiff
conda deactivate
conda activate geotiff
- Install
rasterio
pyproj
and other things:
conda config --add channels conda-forge
conda config --set channel_priority strict
conda install -c conda-forge gdal -n geotiff
conda install pyproj -n geotiff
conda install rasterio -n geotiff
conda install numpy ipython matplotlib -n geotiff
- More detailed instructions here https://rasterio.readthedocs.io/en/latest/installation.html, https://pyproj4.github.io/pyproj/stable/installation.html,
- Clone the
mapblinker
git repo:git clone git@github.com:shriharshtendulkar/mapblinker.git
- Copy the data (Email me for the link)
- Go to the mapblinker directory. Edit
test_script.py
so that the file paths are pointed to the correct location. Save the changes. - Run the code in the terminal: Execute
python test_script.py
in the same directory asmapblinker.py
- The code will print some statistics and numbers on the screen and after a while a matplotlib window will show up. If you click at a location, the coordinates of the location will be printed in the terminal. A snapshot image of the surrounding 100m x 100m is also saved in the same directory.
- If you type
n
orN
, you'll go to the next image. If you typeq
orQ
, the program will quit.