0

I can't figure out why it doesn't work. At first, it worked when I'm testing using this line:

outRas= PrincipalComponents(["band2","band3","band4","band5","band6","band7"],1)

Expected result looks like this image

But when I tried to save the Raster layer as well, it kept returning error-like raster layer

PC= PrincipalComponents(["band2","band3","band4","band5","band6","band7"],1)
PC.save(sceneName+'_PC.tif')

But final one looked like this

I used exactly the same syntax with the test line. No error messages appeared.

  • Did you check values with info-tool? Maybe is only raster's min an max color values – aldo_tapia Mar 28 '18 at 13:49
  • I checked info-tool, the NoData pixels in PC showed either 0 or -2147483647 instead of NoData like in outRas – Trần Ngọc Bích Mar 28 '18 at 13:53
  • Have you tried calculating statistics on the raster? I do not believe that this is done automatically and is often the cause behind what you are seeing. Just use the tool in the ArcToolbox or right click on the raster in ArcCatalogue and select calculate statistics. – Jeffrey Evans Mar 28 '18 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.