I am using ArcPy to clip from a huge raster (about 100.000km²) a smaller part (about 20.000m²) based on the extent of a input polygon. Running the analysis takes forever and although I let it run for hours, the clipping operation never seems to come to an end.
What settings can I use to improve the performance?
My code is as following. Note that I set the extent (extracted by the input polygon) and additionally the input polygon as in_template_dataset, to make sure that only this extent is kept. I save the output in the memory workspace as a TIFF file, because it is only an intermediate result. Is the TIFF format appropriate? I need to keep the cell size, exact raster values from the original raster.
extent = arcpy.Describe(inputPoly) extent_in = str(extent.XMin) + " " + str(extent.YMin) + " " + str(extent.XMax) + " " + str(extent.YMax) output = r"memory\clip.tif" arcpy.management.Clip(elevModel, extent_in, output, inputPoly, "", "NONE", "NO_MAINTAIN_EXTENT")