TransWikia.com

Displaying 2 rasters side by side in ArcGIS Pro Notebook

Geographic Information Systems Asked on May 22, 2021

I have drone imagery that I am performing various processes through a notebook. One thing I would like to do is display the RGB imagery next to a single band plant height raster for visual comparison using Render, but it is only displaying the second raster.

Is it possible to do this?

Here is my code:

name = "PLAZ"
intgdb = "G:...IntermediateData.gdb"
height = Raster("G:...name + "_vegHeight.tif")
heightS = arcpy.management.Shift(height, intgdb + name + "_shift", 775, 0)
arcpy.ia.Render(ortho, {'bands': [3, 2, 1]})
arcpy.ia.Render(heightS, {'bands': [1]})

I was told that because the two rasters occupied the same XY space I had to shift one of them, so I tried that in line 4 but no difference. It seems to only be rendering the last command.

Is there a way to put them side by side to take advantage of the big empty space?

I’ve also included a screenshot.

enter image description here

And here is the result of the Shift, so that tool worked (and just to make sure my question is clear, this is basically what I would like to display in my notebook).
enter image description here

One Answer

It looks like your shift code is wrong See this link for a code example.

If something like this does not work, then edit your post to include all of the code.

output =r'C:some_new_valid_data_pathoutput.tif'
arcpy.management.Shift(height, output, 500, 0)
arcpy.ia.Render(ortho, {'bands': [3, 2, 1]})
arcpy.ia.Render(output, {'bands': [1]})

Answered by GBG on May 22, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP