Skip to main content

Hi,

Is there a sensible way to update part of a large raster held in a Geopackage? I have a large (100GB) raster of the whole of UK in a Geopackage. When a new tile is released by Ordnance Survey I want to insert it into the large Raster. At the moment I can't see any way other than to read the whole of the large raster, then mosaic the new tile, then write the whole raster out to Geopackage again. Just writing the new tile to the Geopackage deletes the existing data, leaving me with just the new tile. Unless I'm not seeing an 'update' parameter.

If I do have to read everything, mosaic, then write, is there a 'most' efficient way of doing that?

Thanks in advance.

Chris

Not being much of an expert in raster, would this be an idea?

Instead of (or as an addition to) having the complete raster in the geopackage database, store the tiles from OS in the database.

That way it is easy to replace one tile.

And as an addition have a mosaic of the raster available in another table.

So after updating the tiles table, replace the complete raster by a new mosaic.

This avoids having to read the complete mosaic from the database and find a way to replace the tile.

Usually creating a new mosaic is faster.

Hope this helps getting on the right track.


Not being much of an expert in raster, would this be an idea?

Instead of (or as an addition to) having the complete raster in the geopackage database, store the tiles from OS in the database.

That way it is easy to replace one tile.

And as an addition have a mosaic of the raster available in another table.

So after updating the tiles table, replace the complete raster by a new mosaic.

This avoids having to read the complete mosaic from the database and find a way to replace the tile.

Usually creating a new mosaic is faster.

Hope this helps getting on the right track.

Erik, Many thanks, although that would double the size of my GeoPackage. I may have to avoid FME and do it directly with gdal_warp, but I'm sure there's a better way...

Chris BB


Reply