# GPKG raster — GeoPackage (raster tiles)

> GPKG raster (GeoPackage (raster tiles)): Raster tile pyramids stored in an OGC GeoPackage SQLite file for basemaps, imagery and offline mapping. Specs, software and free sample files; convert GPKG raster to 50 formats online.

- Page: https://beta.mygeodata.cloud/formats/gpkg-raster

> GPKG files can also contain vector data. [Read about GPKG](https://beta.mygeodata.cloud/formats/gpkg) — OGC standard SQLite-based container storing vector feature layers with geometries, attributes and spatial indexes in one file. [Convert GPKG](https://beta.mygeodata.cloud/converter/gpkg)



## What is a GPKG raster file?

GeoPackage is an open standard of the Open Geospatial Consortium (OGC) that stores geospatial data in a single SQLite database file with the .gpkg extension. Its raster side holds tile pyramids: images cut into fixed-size tiles at a series of zoom levels. These are used for basemaps, orthophotos and offline mapping on desktop and mobile devices.

Each tile set is a table whose rows contain a zoom level, tile column, tile row and the encoded image as a binary blob. Separate metadata tables define the tile matrix set, including its spatial reference system, extent and the dimensions of each zoom level. As a result, any coordinate system registered in the file can be used, with Web Mercator being common. The core specification allows PNG and JPEG tiles, typically 8-bit RGB or RGBA. WebP and gridded elevation data are covered by extensions. One file can hold several tile sets alongside vector layers.

GPKG raster files are usually exchanged by GIS teams, survey and mapping contractors, and mobile app developers who need a basemap or orthophoto in one portable file. Because tiles are pre-rendered at fixed zoom levels, the file is only useful within the tile matrix it defines. Check the spatial reference system, the zoom range and whether tiles are PNG or JPEG before use, since JPEG loses quality and has no transparency.

### Technical details

| | |
|---|---|
| Full name | GeoPackage (raster tiles) |
| Data type | Raster · Tiles & pyramids |
| File extension | .gpkg |
| Files | Single file |
| Media type | — |
| Bands | Typically RGB or RGBA tiles; multiple tile sets possible. |
| Pixel types | 8-bit unsigned (via PNG/JPEG payload) |
| Compression | PNG (lossless), JPEG (lossy) |
| Coordinate system | Any (georeferenced) |
| Converter support | Read & write |
| Typical software | GDAL/OGR, QGIS, ArcGIS Pro, Global Mapper, GeoServer, FME |
| Specification | https://www.geopackage.org/ |

### Specifications & references

- https://www.geopackage.org/
- https://gdal.org/en/stable/drivers/raster/gpkg.html

### Sample GPKG raster files — free download

- [Sentinel-2 true colour (GeoPackage tiles)](https://beta.mygeodata.cloud/static/landing/samples/v1/gpkg_tiles/st-helena-sentinel2-rgb-tiles.gpkg) — Sentinel-2 L2A true-colour image of Saint Helena from 20 April 2024 (S2A_29LRC_20240420_0_L2A), 8-bit RGB with a contrast stretch, 10 m pixels (1812×1524), UTM zone 30S. GeoPackage tile pyramid (JPEG tiles, Web Mercator). (2.1 MB, EPSG:3857)
- [Shaded relief (GeoPackage tiles)](https://beta.mygeodata.cloud/static/landing/samples/v1/gpkg_tiles/st-helena-relief-tiles.gpkg) — Colour shaded relief of Saint Helena (hypsometric tint × multidirectional hillshade) from Copernicus DEM, 20 m, 8-bit RGB, UTM zone 30S. GeoPackage tile pyramid (PNG tiles, Web Mercator). (980 kB, EPSG:3857)

### Convert GPKG raster to other formats

- [GPKG raster to JPG](https://beta.mygeodata.cloud/converter/gpkg-raster-to-jpg)
- [GPKG raster to PNG](https://beta.mygeodata.cloud/converter/gpkg-raster-to-png)
- [GPKG raster to TIF](https://beta.mygeodata.cloud/converter/gpkg-raster-to-tif)
- [GPKG raster to HFA](https://beta.mygeodata.cloud/converter/gpkg-raster-to-hfa)
- [GPKG raster to GIF](https://beta.mygeodata.cloud/converter/gpkg-raster-to-gif)
- [GPKG raster to KMZ raster](https://beta.mygeodata.cloud/converter/gpkg-raster-to-kmz-raster)
- [GPKG raster to JP2](https://beta.mygeodata.cloud/converter/gpkg-raster-to-jp2)
- [GPKG raster to BIL](https://beta.mygeodata.cloud/converter/gpkg-raster-to-bil)
- [GPKG raster to DEM](https://beta.mygeodata.cloud/converter/gpkg-raster-to-dem)
- [GPKG raster to GRD](https://beta.mygeodata.cloud/converter/gpkg-raster-to-grd)
- [GPKG raster to XYZ](https://beta.mygeodata.cloud/converter/gpkg-raster-to-xyz)
- [GPKG raster to GeoPDF raster](https://beta.mygeodata.cloud/converter/gpkg-raster-to-geopdf-raster)
- [GPKG raster to MBTiles raster](https://beta.mygeodata.cloud/converter/gpkg-raster-to-mbtiles-raster)
- [GPKG raster to ENVI](https://beta.mygeodata.cloud/converter/gpkg-raster-to-envi)
- [GPKG raster to BMP](https://beta.mygeodata.cloud/converter/gpkg-raster-to-bmp)
- [GPKG raster to RST](https://beta.mygeodata.cloud/converter/gpkg-raster-to-rst)
- [GPKG raster to AAIGrid](https://beta.mygeodata.cloud/converter/gpkg-raster-to-aaigrid)
- [GPKG raster to WEBP](https://beta.mygeodata.cloud/converter/gpkg-raster-to-webp)

## Frequently asked questions

### Can one GPKG file contain both raster tiles and vector layers?

Yes. A GeoPackage is a SQLite database, so tile tables and vector feature tables can sit in the same .gpkg file. Some software shows only one type, so a file may look empty if you open it as the wrong kind.

### Why does my GPKG raster look blurry or show gaps when zooming?

Tiles exist only for the zoom levels stored in the tile matrix set. Zooming beyond them makes the software enlarge existing tiles, which looks blurry. Gaps appear where no tiles were generated for the area, or where the extent does not cover it.

### How does GPKG raster differ from MBTiles?

Both store tile pyramids in a SQLite database. GeoPackage is an OGC standard that supports any registered coordinate system and can also hold vector data and several tile sets. MBTiles is typically used for Web Mercator web maps.

### What is a GPKG raster file?

GeoPackage is an open standard of the Open Geospatial Consortium (OGC) that stores geospatial data in a single SQLite database file with the .gpkg extension. Its raster side holds tile pyramids: images cut into fixed-size tiles at a series of zoom levels. These are used for basemaps, orthophotos and offline mapping on desktop and mobile devices.

Each tile set is a table whose rows contain a zoom level, tile column, tile row and the encoded image as a binary blob. Separate metadata tables define the tile matrix set, including its spatial reference system, extent and the dimensions of each zoom level. As a result, any coordinate system registered in the file can be used, with Web Mercator being common. The core specification allows PNG and JPEG tiles, typically 8-bit RGB or RGBA. WebP and gridded elevation data are covered by extensions. One file can hold several tile sets alongside vector layers.

### How do I open a GPKG raster file?

GPKG raster files can be opened in GDAL/OGR, QGIS, ArcGIS Pro, Global Mapper and GeoServer. Without any software you can preview and convert them online in MyGeodata Cloud.

### What can I convert GPKG raster to?

Popular conversions are JPG, PNG, TIF, HFA, GIF and KMZ raster. In total the Converter writes GPKG raster data to 50 formats.

### How do I create a GPKG raster file?

Convert existing data to GPKG raster — for example from JPG, TIF, PNG, HFA and GRD. Upload the file, choose GPKG raster as output and download the result.

### Is a GPKG file vector or raster?

A GPKG file can store raster data or vector data, depending on how it was created. This page describes the raster variant; the other variant has separate specifications and conversion options.

