View on GitHub

Add rasters and feature tables from a geopackage to a map.

Image of Add rasters and feature tables from geopackage sample

Use case

The OGC GeoPackage specification defines an open standard for sharing raster and vector data. GeoPackages are designed to simplify file management and transfer. An end-user wishing to transfer rasters from ArcGIS Pro or between ArcGIS Maps SDK apps, might need to import raster files from GeoPackages into their map to view and analyze the data.

How to use the sample

When the sample loads, the feature tables and rasters from the GeoPackage will be shown on the map.

How it works

  1. Open the GeoPackage using the path to the local .gpkg file.
  2. Iterate through available rasters, exposed by the GeoPackageRasters from the GeoPackage.
    • For each raster, create a raster layer then add it to the map.
  3. Iterate through available feature tables, exposed by GeoPackageFeatureTables.
    • For each feature table, create a feature layer then add it to the map.

Relevant API

  • FeatureLayer
  • GeoPackage
  • GeoPackageFeatureTable
  • GeoPackageRaster
  • RasterLayer

Offline data

This sample features a Aurora Colorado GeoPackage that holds datasets that cover Aurora, Colorado. It has various data including Public art (points), Bike trails (lines), Subdivisions (polygons), Airport noise (raster), and liquor license density (raster).

Additional information

GeoPackage uses a single SQLite file (.gpkg) that conforms to the OGC GeoPackage Standard. You can create a GeoPackage file (.gpkg) from your own data using the create a SQLite Database tool in ArcGIS Pro.

Tags

container, geopackage, layer, map, OGC, package, raster, table