Read and respond to the post here: https://publiclab.org/wiki/ndvi-calculation
Good example in GDAL/Python: http://www.gis.usu.edu/~chrisg/python/2009/lectures/ospy_slides5.pdf
Script for GDAL: http://www.jeremymsmith.us/davidson/NDVI.py
Remember, NDVI is:
Infrared - Visible / Infrared + Visible
Splice out a single band and save as independent geotiff:
gdal_translate -of GTiff -b 2 morflex-freeflight-geo.tif morflex-freeflight-green.tif
On using NDVI.py, I got this error:
nautilus-2:morflex-lima-freeflight warren$ python NDVI.py
Traceback (most recent call last):
File "NDVI.py", line 31, in
var1 = subtract(band4, band3)
ValueError: shape mismatch: objects cannot be broadcast to a single shape
Perhaps we can use this GDAL crop script to make both images the same shape: http://www.enricozini.org/2010/tips/gdal-crop/
Respond to the post here: https://publiclab.org/wiki/ndvi-calculation
This post was tagged with #ndvi by liz
You received this email because it was tagged with: ndvi.
Subscribe to all the tags for this post by visiting https://publiclab.org/subscribe/multiple/tag/ndvi.
To change your preferences, please visit https://publiclab.org/subscriptions.
Report spam and abuse to: moder...@publiclab.org
Check out the blog at https://publiclab.org/blog | Love our work? Become a Public Lab Sustaining Member today at https://publiclab.org/donate If this email title has an ID in the format #0000, you can reply with the email you use at PublicLab.org and your response will be posted as a comment on the website.