Raster To Geodatabase (Conversion)

Summary

Loads raster datasets into a geodatabase.

Usage

  • The output is the location of the geodatabase that will store the rasters.

Parameters

LabelExplanationData Type
Input Rasters

The input raster datasets.

Raster Dataset; Raster Layer
Output Geodatabase

The output or destination geodatabase.

Workspace
Configuration Keyword
(Optional)

The storage parameters (configuration) for a geodatabase. Configuration keywords are set up by your database administrator.

String

Derived Output

LabelExplanationData Type
Updated Geodatabase

The geodatabase containing the new rasters.

Workspace

arcpy.conversion.RasterToGeodatabase(Input_Rasters, Output_Geodatabase, {Configuration_Keyword})
NameExplanationData Type
Input_Rasters
[Input_Rasters,...]

The input raster datasets.

Raster Dataset; Raster Layer
Output_Geodatabase

The output or destination geodatabase.

Workspace
Configuration_Keyword
(Optional)

The storage parameters (configuration) for a geodatabase. Configuration keywords are set up by your database administrator.

String

Derived Output

NameExplanationData Type
Derived_Geodatabase

The geodatabase containing the new rasters.

Workspace

Code sample

RasterToGeodatabase example (Python window)

This is a Python sample for the RasterToGeodatabase function.

import arcpy
from arcpy import env
env.workspace = "c:/data"
arcpy.conversion.RasterToGeodatabase("test.tif;test2.tif;test3.tif", 
                                     "ToGDB.gdb", "")
RasterToGeodatabase example 2 (stand-alone script)

This is a Python script sample for the RasterToGeodatabase function.

##=========================
##Raster To Geodatabase
##Usage: RasterToGeodatabase_conversion Input_Rasters;Input_Rasters... 
##       Output_Geodatabase {Configuration_Keyword}


import arcpy
arcpy.env.workspace = r"\\MyMachine\PrjWorkspace\RasGP"
    
##Convert Multiple Raster Dataset to FGDB
arcpy.conversion.RasterToGeodatabase("test.tif;test2.tif;test3.tif", 
                                 "ToGDB.gdb","MAX_FILE_SIZE_4GB")

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics