OGC GeoPackage Tiles Reader/Writer

FME can read and write data in the GeoPackage Tiles format.

The GeoPackage specification is an efficient format for storing tilesets in a single SQLite database file, and it is ideal for sending data over the web, or displaying data on a mobile device.

Reader Overview

FME considers a single GeoPackage file to be a dataset.

The file must contain entries in the geopackage_contents table with the type tiles or 2d-gridded-coverage to be valid for reading with the GeoPackage Tiles reader.

The reader allows for selecting subsets of data based on a user-provided spatial envelope and/or a specific zoom level.

If a specific zoom level is specified, then the a mosaicked feature with raster geometry is read using the tiles at that zoom level. Otherwise a mosaicked feature is read using the tiles at the most resolute zoom level.

Writer Overview

The GeoPackage Tiles writer stores the raster tiles data inside a SQLite .gpkg file. The file does not have to exist before the translation occurs. An existing file with the same name will be overwritten with the new feature data.

Each raster feature is written as a tiles table or a 2d-gridded-coverage table within the GeoPackage file, depending on the bit-depth of the raster bands. Rasters with a single band of Int16, UInt16, or Real32 data will be written as a 2d-gridded-coverage table. All other rasters will be written as a tiles table. The image is converted into tiles and then written to the zoom level that best matches the image resolution.

The writer allows for generating additional zoom levels and also allows various tiling schemes, image formats, and compression levels to be specified.

Writer-Level Format Parameters

The writer supports additional options through the OGC GeoPackage Tiles Writer Feature Type Parameters dialog.

Usage Notes

  • FME supports writing to GeoPackage version 1.2.
  • GeoPackage supports PNG, PNG8, and JPEG data stored as binary blobs in the tiles column. Additionally, it supports WEBP tiles as an extension, and TIFF files as part of the tiled gridded coverages extension.
  • A GeoPackage Tiles table is composed of tile layers called Zoom Levels. Zoom Level 0 has the least resolution, and most tiling schemes contain only 1 or 2 tiles at this level. Each successive zoom level has greater resolution than the last. In most tiling schemes, each zoom level has twice the resolution and four times as many tiles as the previous zoom level.
  • In FME, a single GeoPackage file is a dataset and each tiles table within the file is a feature type. Each tiles table is read and written as a single mosaicked feature with raster geometry. Each pixel color value in a tile is a value in a single FME raster feature.

FME Raster Features

FME raster features represent raster data and use several concepts that are unlike those used in the handling of vector data.

For comprehensive information about how FME processes raster data, see Rasters.

GeoPackage Tiles supports rasters with up to 4 bands.