Select to view content in your preferred language

Raster Image in a Mosaic has boundaries but I can't see the image

949
3
11-08-2021 02:57 AM
matteorizzi
Occasional Contributor

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
3 Replies
Tomasz_Tarchalski
Occasional Contributor

Hi,

some ideas:

  • Your second image shows only one item in table. make sure that the 'image_path' is the folder with both images. also set update boundary.
  • Remember: Footprint: is shows the extent of each data. boundary: will show data only within the extent of  that boudnary.
0 Kudos
matteorizzi
Occasional Contributor

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.

0 Kudos
JohannesLindner
MVP Frequent Contributor

Try building the overviews and/or pyramids:

arcpy.management.AddRastersToMosaicDataset(
    mosaic,
    "Raster Dataset",
    image_path,
    update_overviews=True,
    build_pyramids=True
    )

Have a great day!
Johannes
0 Kudos