I have a script that was written in Python in PyCharm.
The script is something meant to run once then all the indices I list in the python can run from PyCharm rather than opening the ArcMap or ArcGIS Pro software everytime.
When running the script I get the NDVI that is expected, however the CLG index does not provide a reading as expected.
Clgreen using the Arcpy provides an output, while the
Clgreen2 using the ArcGIS fails in giving an output.
import arcpy import arcgis from datetime import date output = r'C:\Users\john\Desktop\testing\RedEdge\Exports' raster = r'C:\Users\john\Desktop\testing\RedEdge\Exports\RedEdge.tif' today = date.today() date = today.strftime("%d-%m-%Y") #formulas - indices NDVI = arcpy.ia.NDVI(raster, nir_band_id=5, red_band_id=3) Clgreen = arcpy.ia.CIg(raster,nir_band_id=5, green_band_id=2) Clgreen2 = arcgis.raster.cig(raster,band_indexes="5 2", astype=None) #save Clgreen.save(output+'\\'+date+'_' +'clgreen.tif') Clgreen2.save(output+'\\'+date+'_' +'clgreen2.tif') NDVI.save(output+'\\'+date+'_'+'ndvi2.tif') print('scripting was successfull ! ')
Image 1 is
Clgreen in imageviewer and image 2 is in ArcGIS PRO.
So the questions I have is why is the output of the
Clgreennot shown in ArcMap or ArcGIS pro, but shows fine in imageviewer
What would the reason be that the