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:
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:
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?
Hi,
some ideas:
Hi, thanks for the answer. I deleted the first one because it was the one uploaded through ArcGIS Pro, and it worked... I needed only the second one to highlight the problem.
About the boundary, I tried to put 'update boundary' in the script, and it doesn't change the output: yes footprint, no image shown.
Try building the overviews and/or pyramids:
arcpy.management.AddRastersToMosaicDataset(
mosaic,
"Raster Dataset",
image_path,
update_overviews=True,
build_pyramids=True
)