Raster has boundaries but I can't see the image

167
1
11-08-2021 02:55 AM
matteorizzi
New Contributor II

Hello, I am facing problems with rasters in mosaic. When I add a raster using the Add Raster To Mosaic tool in ArcGIS Pro, everything works right, and I can see both boundaries and image: 

matteorizzi_0-1636368584755.png


On the contrary, if I export the python code to do that: 

arcpy.AddRastersToMosaicDataset_management(mosaic,
"Raster Dataset",
image_path,
"UPDATE_CELL_SIZES",
"NO_BOUNDARY",
"NO_OVERVIEWS",
None,
0,
1500,
None,
'',
"SUBFOLDERS",
"ALLOW_DUPLICATES",
"NO_PYRAMIDS",
"NO_STATISTICS",
"NO_THUMBNAILS",
'',
"NO_FORCE_SPATIAL_REFERENCE",
"NO_STATISTICS",
None,
"USE_PIXEL_CACHE",
None)

and I run it with a Python interpreter. I can see only the boundaries of the raster and not anymore the image:

matteorizzi_1-1636368745560.png

So a brief recap: same raster image, same mosaic, two different behaviour by running the tool using in the first case ArcGIS Pro and the second arcpy. Do you have any suggestions? 

 

 

0 Kudos
1 Reply
HannesZiegler
Esri Contributor

Hi matteorizzi, I'm unable to reproduce your issue. Are you running this from Python Window or outside of Pro? It's possible the symbology needs to be updated for the raster to display. See if the raster displays if you zoom in closer, say 1:24, and adjust visibility ranges if needed. Make sure you build pyramids for the imagery (On catalog, right-click Mosaic Dataset >> Modify >> Build Item Pyramids and Statistics). You might also want to double check the variables in your code snippet and make sure they have the expected values. If you're on an older version of Pro, upgrading to a newer version might help.

0 Kudos