Commit 3221d5e1 authored by Mario Chirinos Colunga's avatar Mario Chirinos Colunga 💬

ndvi sh

parent fa80f108
...@@ -36,7 +36,7 @@ def geoint_pr_ndvi(nir_fn, vir_fn, outfile): ...@@ -36,7 +36,7 @@ def geoint_pr_ndvi(nir_fn, vir_fn, outfile):
# driverJP2 = gdal.GetDriverByName('JP2OpenJPEG') # driverJP2 = gdal.GetDriverByName('JP2OpenJPEG')
# driverJP2ECW = gdal.GetDriverByName('JP2ECW') # driverJP2ECW = gdal.GetDriverByName('JP2ECW')
# raster = np.zeros((rows, cols), dtype=np.uint8) # raster = np.zeros((rows, cols), dtype=np.uint8)
output = driverTiff.Create(outfile+".tiff", cols, rows, 1, gdal.GDT_Byte) output = driverTiff.Create(outfile, cols, rows, 1, gdal.GDT_Byte)
# output = driverTiff.CreateCopy(outfile+".tiff", nir, strict=0) # output = driverTiff.CreateCopy(outfile+".tiff", nir, strict=0)
# output = driverJP2.CreateCopy(outfile, nir, strict=0) # output = driverJP2.CreateCopy(outfile, nir, strict=0)
output.GetRasterBand(1).SetNoDataValue(-99) output.GetRasterBand(1).SetNoDataValue(-99)
......
...@@ -48,14 +48,14 @@ do ...@@ -48,14 +48,14 @@ do
fileout1=$(echo $filepattern | cut -d"_" -f1) fileout1=$(echo $filepattern | cut -d"_" -f1)
fileout2=$(echo $filepattern | cut -d"_" -f2) fileout2=$(echo $filepattern | cut -d"_" -f2)
python /home/geoint/git/GeoSentinel/geosentinel/ndvi.py $NIR $VIR ndvi/$fileout2"_"$fileout1".jp2" python $HOME/git/GeoSentinel/geosentinel/ndvi.py $NIR $VIR ndvi/$fileout2"_"$fileout1".tiff"
# convert $filepattern"04.jpg" $filepattern"03.jpg" $filepattern"02.jpg" -resize 640x480\! -combine video/$fileout2"_"$fileout1".jpg" # convert $filepattern"04.jpg" $filepattern"03.jpg" $filepattern"02.jpg" -resize 640x480\! -combine video/$fileout2"_"$fileout1".jpg"
if [ ! -d "video" ]; then if [ ! -d "video" ]; then
mkdir video mkdir video
fi fi
# gdal_translate -projwin $3 -projwin_srs WGS84 -ot Byte -scale 0 4096 0 255 -of JPEG ndvi/$fileout2"_"$fileout1".jp2" video/$fileout2"_"$fileout1".jpg" gdal_translate -projwin $3 -projwin_srs WGS84 -ot Byte -scale 0 4096 0 255 -of JPEG ndvi/$fileout2"_"$fileout1".tiff" video/$fileout2"_"$fileout1".jpg"
cd .. cd ..
......
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