Commit 9eee94a5 authored by Mario Chirinos Colunga's avatar Mario Chirinos Colunga 💬

box

parent aa756bad
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
import sys import sys
import numpy as np import numpy as np
import gdal import gdal
from osgeo import osr
def geoint_pr_ndvi(nir_fn, vir_fn, outfile): def geoint_pr_ndvi(nir_fn, vir_fn, outfile):
'''! '''!
Normalized Difference Vegetation Index (NDVI) Normalized Difference Vegetation Index (NDVI)
...@@ -43,6 +45,8 @@ def geoint_pr_ndvi(nir_fn, vir_fn, outfile): ...@@ -43,6 +45,8 @@ def geoint_pr_ndvi(nir_fn, vir_fn, outfile):
output.GetRasterBand(1).WriteArray(result) output.GetRasterBand(1).WriteArray(result)
output.GetRasterBand(1).FlushCache() output.GetRasterBand(1).FlushCache()
output.SetGeoTransform(geotransform) output.SetGeoTransform(geotransform)
wkt = nir.GetProjection()
output.SetProjection(osr.SpatialReference().ImportFromWkt(wkt).ExportToWkt())
output = None output = None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment