ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Raster To Geodatabase

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Loads multiple raster datasets into a geodatabase or raster catalog.

If this tool is used to load raster datasets into a raster catalog, then you need to run the Calculate Default Spatial Grid Index tool after the loading is completed.

Usage

  • The output is the location of the geodatabase where you will store the raster.

  • All raster datasets loaded into an unmanaged raster catalog must be a file on disk. Geodatabase raster datasets can only be loaded into raster catalogs that are managed.

  • When converting the raster dataset to a personal geodatabase (.mdb), the raster dataset is stored on the file system in a hidden folder. This prevents you from going over the 2 GB limit that is imposed on a personal geodatabase; the actual raster dataset is saved as an ERDAS IMAGINE file.

  • If this tool is used to load raster datasets into a raster catalog, then the Calculate Default Spatial Grid Index tool will need to be run after the loading is completed.

    Learn more about geodatabase items—Spatial index grid size

  • When converting the raster dataset to an enterprise geodatabase, the raster dataset is stored as a raster geodatabase format. A configuration keyword can be specified (if configuration keywords are specified by the enterprise administrator).

  • The Cellsize and Mask parameters are ignored by this tool.

Syntax

RasterToGeodatabase_conversion (Input_Rasters, Output_Geodatabase, {Configuration_Keyword})
ParameterExplanationData Type
Input_Rasters
[Input_Rasters,...]

Input raster dataset(s).

Raster Dataset
Output_Geodatabase

The path and name of a geodatabase or raster catalog.

Workspace
Configuration_Keyword
(Optional)

Specifies the storage parameters (configuration) for a file or enterprise geodatabase. Configuration keywords are set up by your database administrator.

Personal geodatabases do not use configuration keywords.

String

Code sample

RasterToGeodatabase example (Python window)

This is a Python sample for RasterToGeodatabase.

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

This is a Python script sample for RasterToGeodatabase.

##=========================
##Raster To Geodatabase
##Usage: RasterToGeodatabase_conversion Input_Rasters;Input_Rasters... Output_Geodatabase {Configuration_Keyword}
try:
    import arcpy
    arcpy.env.workspace = r"\\MyMachine\PrjWorkspace\RasGP"
    ##Convert Multiple Raster Dataset to FGDB
    arcpy.RasterToGeodatabase_conversion("ToGDB.mdb\\test;test.tif","ToGDB.gdb","MAX_FILE_SIZE_4GB")
    ##Load Raster Catalog
    arcpy.RasterToGeodatabase_conversion("test.tif;test2.tif;test3.tif","ToGDB.gdb\\catalog")
except:
    print "Raster To Geodatabase exsample failed."
    print arcpy.GetMessages()

Environments

  • Compression
  • Current Workspace
  • Output CONFIG Keyword
  • Output XY Domain
  • Output Z Domain
  • Output Coordinate System
  • Extent
  • Output has Z values
  • Output Spatial Grid 1
  • Output Spatial Grid 2
  • Output Spatial Grid 3
  • Pyramid
  • Raster Statistics
  • Scratch Workspace
  • Tile Size
  • Z Resolution

Licensing information

  • ArcGIS for Desktop Basic: Yes
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related topics

  • Copy Raster
  • About loading data in ArcMap
  • A quick tour of the geodatabase
  • An overview of the To Geodatabase toolset

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal