2

I am using ArcPy to save a TIFF file in a geodatabase file with this code:

arcpy.RasterToGeodatabase_conversion(Input_Rasters=r'D:\Projects\GEBCO_2019_Geotiff.tif', Output_Geodatabase=r'D:\Projects\Example.gdb')

This will create a layer named GEBCO_2019_Geotiff.

What I want is to set by myself the layer name, is there a way?

  • 5
    If you only have to convert one raster, I would probably use the Copy Raster function, which will do the same as the RasterToGeodatabase but will give you control on the name of the output. – umbe1987 Jul 10 at 15:04
  • @umbe1987 thanks a lot! That's perfect! – cicciodevoto Jul 10 at 15:28
  • you're welcome ;) – umbe1987 Jul 10 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.