This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# ndvi.py red.tif nir.tif output-ndvi.tif | |
# Calculate NDVI (see Wikipedia). Assumes atmospheric correction. | |
# (Although I use it without all the time for quick experiments.) | |
import numpy as np | |
from sys import argv | |
from osgeo import gdal, gdalconst |