Question

Write GeoPackage Tiles with pyramids from non pyramid raster


Badge +20

I am reading non pyramid tiff files in CRS EPSG:3844 and I am trying to write to Geopackage Tiles with pyramids using Incoming Feature Tiling Scheme to keep the original CRS.

Using RasterPyramider the output is one raster for each pyramid level, that translates to many tables in Geopackage Tiles and it defeats the purpose.

How should I aggregate/combine the level rasters to write a consistent GPKG file (directly)?


2 replies

Userlevel 1
Badge +10

Hi @caracadrian​. My colleague on our development team helped address your question: It is currently tricky/manual to get the GeoPackage writer to write existing rasters as pyramid layers -- i.e. there isn't a scheme to identify, collate, and validate multiple incoming rasters and related and at the correct bounds, resolution, and cell grid to be a set of pyramids. The expectation is that pyramids can be easily generated given the source / highest resolution raster given various tiling schemes and coordinate systems. In FME 2022.0 support was added for custom tiling schemes. A custom tiling scheme means that the coordinate system and extents of the tileset are based on the incoming raster. Check out the documentation here under Tiling Scheme Parameters  with a value of 

Use Incoming Feature to enable the custom tiling scheme. I believe this should preserve the incoming CRS. Please let us know if using the highest resolution input TIFF file and a custom tiling scheme to generate pyramids helps you.

Badge +20

Hi @caracadrian​. My colleague on our development team helped address your question: It is currently tricky/manual to get the GeoPackage writer to write existing rasters as pyramid layers -- i.e. there isn't a scheme to identify, collate, and validate multiple incoming rasters and related and at the correct bounds, resolution, and cell grid to be a set of pyramids. The expectation is that pyramids can be easily generated given the source / highest resolution raster given various tiling schemes and coordinate systems. In FME 2022.0 support was added for custom tiling schemes. A custom tiling scheme means that the coordinate system and extents of the tileset are based on the incoming raster. Check out the documentation here under Tiling Scheme Parameters  with a value of 

Use Incoming Feature to enable the custom tiling scheme. I believe this should preserve the incoming CRS. Please let us know if using the highest resolution input TIFF file and a custom tiling scheme to generate pyramids helps you.

Thanks for the info. It is not something totally unknown to me.

For some reason using Use Incoming Feature for Tiling Scheme doesn't generate Zoom Levels for TIFF, only for AUTO Tile Format.

As it's a new feature I don't expect it to just work perfectly out of the box. Maybe it's fixed in the latest build, I have to try it first.

As a workaround I generated pyramids in the Geopackage tiles using QGIS. It took around 2 minutes of processing for a 1Gb file and added another 300-400Mb to it.

There should be a transformer that takes the output of RasterPyramider and aggregates it for writing.

Fot the future we will need to create some cartographic generalized zoom levels and write them in single "files". That would be tricky/manual work.

Reply