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.
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
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:
About the data
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.WPF.Samples.RasterLayerGeoPackage.RasterLayerGeoPackage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"> <Grid> <esri:MapView x:Name="MyMapView" /> </Grid> </UserControl>