Select to view content in your preferred language

Using "memory\" on Mosaic_to_new_raster

553
1
10-31-2022 06:28 AM
Labels (1)
koprolith90
New Contributor

Hello Everyone,
using Python I am trying to to store the outputs of the mosaic-to-new-raster function in the-in-memory-workspace for further processing without writing the resulting raster to disc.

The examples provided have only one output parameter. However, mosaic-to-new-raster requires two parameters to define the output: "output_location" and "raster_dataset_name_with_extension". 

arcpy.management.MosaicToNewRaster(input_rasters, output_location, raster_dataset_name_with_extension, {coordinate_system_for_the_raster}, {pixel_type}, {cellsize}, number_of_bands, {mosaic_method}, {mosaic_colormap_mode})

Is it possible to use the in-memory-workspace for this functions outputs?

If so, how to define the output parameters? 

I am using ArcGIS pro 2.9.3. The support of rasters for "in_memory" was introduced in ArcGIS Pro 2.5 from what i found.

Best regards,

koprolith90

 

 

0 Kudos
1 Reply
DanPatterson
MVP Esteemed Contributor
output_location

The folder or geodatabase to store the raster.

Workspace

To write to the memory workspace, specify an output dataset path beginning with memory\ and including no file extension—for example, memory\tempOutput.

you can't create a folder in memory workspace or add a file extension, so if you tried and it failed, those would be the reasons.


... sort of retired...
0 Kudos