How to optimize copy raster function when copying layer raster layer to cloud raster format?

947
3
10-19-2021 07:51 AM
RehanChaudhary
Occasional Contributor

i am creating a multidimensional raster layer from a netcdf file and then copying it to a cloud raster format (crf) using the copy raster function. The problem i am having is that as the file size of my netcdf files gets bigger it takes a lot of time for this function to complete (around 10 minutes for 1 mb file) and creates a crf of 1 GB which is quite huge. How can i optimize this function so that it processes the file faster and it creates a crf that does not takes up that much space?

 

netCDF_in = r"C:\Users\arcgis\New\test_large.nc"
temperature = "temperature"
out_rasterdataset=r"C:\Users\arcgis\temperature.crf"
p=arcpy.md.MakeMultidimensionalRasterLayer(in_multidimensional_raster=netCDF_in, out_multidimensional_raster_layer=temperature,variables=["sea_floor_salinity","sea_floor_temperature"])
arcpy.CopyRaster_management(
	"temperature", out_rasterdataset,"",None,-3.402823e+38,"NONE","NONE","","NONE","NONE", "CRF", "NONE", "ALL_SLICES", "TRANSPOSE")

 

0 Kudos
3 Replies
DanPatterson
MVP Esteemed Contributor

Copy Raster (Data Management)—ArcGIS Pro | Documentation

The option Build Multidimensional Transpose may be the cause so you should look at whether you require its functionality

 

Raster To Other Format (Conversion)—ArcGIS Pro | Documentation is another option


... sort of retired...
0 Kudos
RehanChaudhary
Occasional Contributor

i tried running without it and it still takes the same amount of time and a lot of space

0 Kudos
DanPatterson
MVP Esteemed Contributor

Nothing more to suggest then


... sort of retired...
0 Kudos