Raster layer (GeoPackage)
Display a raster contained in a GeoPackage.
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.
When the sample starts, a raster will be loaded from a GeoPackage and displayed in the map view.
- Create and load a
GeoPackage, specifying the path to the local .gpkg file.
- When it is done loading, get the
GeoPackageRasters from the geopackage.
- Construct a
RasterLayerwith the geopackage raster you want to use.
- Add the raster layer to the map.
This sample downloads the following items from ArcGIS Online automatically:
The Aurora Colorado GeoPackage holds datasets that cover Aurora, Colorado. The raster that is opened and displayed shows airport noise levels.
container, data, image, import, layer, OGC, package, raster, visualization
<UserControl x:Class="ArcGIS.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>