Display a raster contained in a GeoPackage.
Use case
GeoPackages are designed to simplify file management and transfer. They can store raster files (as well as other types of data). An end-user wishing to transfer rasters from ArcGIS Pro or between runtime 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 starts, a raster will be loaded from a GeoPackage and displayed in the map view.
How it works
- Create and load a
GeoPackage
, specifying the path to the local .gpkg file. - When it is done loading, get the
GeoPackageRaster
s from the geopackage. - Construct a
RasterLayer
with the geopackage raster you want to use. - Add the raster layer to the map.
Relevant API
- GeoPackage
- GeoPackageRaster
- RasterLayer
Offline data
This sample downloads the following items from ArcGIS Online automatically:
About the data
The Aurora Colorado GeoPackage holds datasets that cover Aurora, Colorado. The raster that is opened and displayed shows airport noise levels.
Tags
container, data, image, import, layer, OGC, package, raster, visualization
Sample Code
<UserControl
x:Class="ArcGISRuntime.UWP.Samples.RasterLayerGeoPackage.RasterLayerGeoPackage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:esriUI="using:Esri.ArcGISRuntime.UI.Controls" >
<esriUI:MapView x:Name="MyMapView" />
</UserControl>