ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS 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
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Add Raster to GeoPackage

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

Summary

Loads raster datasets into an OGC GeoPackage raster pyramid.

Usage

  • The target GeoPackage can be created using the Create SQLite Database tool.

  • The GeoPackage raster name cannot already exist in the GeoPackage.

  • Raster data with an unknown coordinate reference will be created with a 6-level tiling scheme.

Syntax

arcpy.conversion.AddRasterToGeoPackage(in_dataset, target_geopackage, raster_name, {tiling_scheme}, {tiling_scheme_file}, {area_of_interest})
ParameterExplanationData Type
in_dataset

The raster dataset to load into the OGC GeoPackage raster pyramid.

Raster Layer; Mosaic Layer
target_geopackage

The GeoPackage into which the raster dataset will be loaded.

Workspace
raster_name

The name of the output GeoPackage raster pyramid.

String
tiling_scheme
(Optional)

Specifies the tiling scheme.

  • TILED —The spatial reference of the input raster will be maintained and tiles will be generated consistent with the GeoPackage standard. This is the default.
  • ARCGISONLINE_SCHEME — Raster tiles will be generated in a Web Mercator coordinate reference (the same scheme developed for the Army Geospatial Center).
  • NSGPROFILE_SCALED_TRANSVERSE_MERCATOR —A scaled transverse Mercator will be used.
  • NSGPROFILE_WGS84_GEOGRAPHIC —WGS84 Geographic will be used.
  • GOOGLE_EARTH_WEB_MERCATOR —Raster tiles will be created using the parameters in the Web Mercator coordinate reference.
  • FROM_FILE —A custom tiling scheme from a file with an XML schema definition created using the Generate Tile Cache Tiling Scheme tool will be used.
String
tiling_scheme_file
(Optional)

A custom tiling scheme file that is required when tiling_scheme is set to FROM_FILE.

File
area_of_interest
(Optional)

An area of interest used to limit the area of the raster to be loaded, rather than the entire dataset.

Feature Set

Derived Output

NameExplanationData Type
out_geopackage_raster

The updated GeoPackage.

Raster Dataset

Code sample

AddRasterToGeoPackage example 1 (Python window)

The following Python window script demonstrates how to use the AddRasterToGeoPackage function.

import arcpy
arcpy.AddRasterToGeoPackage_conversion("c:/data/san_diego.png", "c:/data/san_diego.gpkg", 
                                       "SanDiego", "TILED")

Environments

  • Compression
  • Pyramid

Licensing information

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

Related topics

  • An overview of the To GeoPackage toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal