How vp717/ndvi works
This is a small Python utility for calculating NDVI from near-infrared and red raster bands. The demo opens the bundled images, passes their bands and geospatial metadata to the calculation function, and requests both integer-scaled and floating-point outputs. The function reads the bands into NumPy arrays, computes NDVI, and uses GDAL to write a georeferenced GeoTIFF. The runtime relationships are shown from the excerpts; no additional subsystems are evident in this small repository.
Main entry points: ndvi_demo.py Demo script · ndvi.py NDVI calculation · NIR_IMAGE.tif NIR raster · RED_IMAGE.tif Red raster
Components 8
Other components
- User
- Demo script
ndvi/ndvi_demo.py - NIR raster
ndvi/NIR_IMAGE.tif - Red raster
ndvi/RED_IMAGE.tif - NDVI calculation
ndvi/ndvi.py - NumPy
- GDAL
- Output GeoTIFF
Connections 7
- User → Demo script: runs
README.md - Demo script → NIR raster: opens
ndvi/ndvi_demo.py - Demo script → Red raster: opens
ndvi/ndvi_demo.py - Demo script → NDVI calculation: calls
ndvi/ndvi_demo.py - NDVI calculation → NumPy: computes with
ndvi/ndvi.py - NDVI calculation → GDAL: reads and writes
ndvi/ndvi.py - NDVI calculation → Output GeoTIFF: creates
ndvi/ndvi.py