Basic Sheet
Basic Sheet
Miniconda https://docs.conda.io/projects/miniconda/en/latest/index.html
Set up an environment
Install packages
conda install pip # pip will be used in the notebook for downloading packages
Miniconda is a smaller version of Anaconda that does not include a lot of preinstalled libraries/packages
(bloatware). This is preferred, since one can just download packages at will.
Miniforge https://github.com/conda-forge/miniforge
Anaconda – free for students and researchers. Others will have to get a license
You can specific the channel when you download a package. E.g.:
Conda install –c conda-forge numpy # this will download ‘numpy’ from the ‘conda-forge’ channel
It is normally best to have all packages installed from the same channel. But you can mix, anaconda, conda-forge,
pip etc. But problems could arise from doing so.
Command prompt basics
start . opens the folder/directory you are located in (in windows GUI)
Tab autocomplete
Many of the functions have also been implemented in python but the names and syntax is a bit different.
https://gdal.org/programs/gdalinfo.html
https://gdal.org/programs/gdalbuildvrt.html
gdalbuildvrt output.vrt *tif # creates a vrt of all tiff images in the directory
gdalbuildvrt -input_file_list my_list.txt output.vrt # creates a .vrt of all images in a list of files
https://gdal.org/programs/gdaladdo.html
gdaladdo name.vrt 2 4 8 16 # creates overview of a vrt or raster which significantly speeds of the view/interaction
in a GIS software – can take a long time if many overviews are computed on a large image. Very useful for .vrts. The
numbers given a just an example
https://gdal.org/programs/gdaltindex.html
gdaltindex name.shp *tif # creates an polygon shapefile (or other vector formats – e.g. gpkg) with the footprints of
all images in a directory.