TileDao provides access to raster tiles stored in a GeoPackage tile table. Each tile is identified by its column, row, and zoom level. Obtain a TileDao from an open GeoPackage.
TileDao extends UserDao, so generic row operations such as queryForAll(), create(), update(), and deleteById() are also available.Creating a TileDao
getTileDao()
Call this on an openGeoPackage to get a TileDao for the named tile table.
Querying tiles
queryForTile()
Returns theTileRow at the given tile grid coordinates, or null if no tile exists at that location.
Tile column index (x-axis).
Tile row index (y-axis).
Zoom level of the requested tile.
The matching tile row, or
null if not found.queryForTiles()
Returns aTileResultSet of all tiles at the specified zoom level.
Zoom level to query.
Result set that should be closed after use.
queryByTileGrid()
Returns aTileResultSet for all tiles within the given TileGrid at a zoom level. Use this for range queries across columns and rows.
A
TileGrid specifying min/max column and min/max row bounds.Zoom level to query.
Optional SQL
ORDER BY expression.Result set, or
null if the tile grid is null.queryForTilesInColumn()
Returns aTileResultSet of all tiles in a specific column at a zoom level.
queryForTilesInRow()
Returns aTileResultSet of all tiles in a specific row at a zoom level.
deleteTile()
Deletes the tile at the specified coordinates. Returns the number of rows deleted.Zoom level helpers
getMinZoom()
Returns the minimum zoom level present in this tile table.getMaxZoom()
Returns the maximum zoom level present in this tile table.getZoomLevels()
Returns an array of all zoom levels that have a correspondingTileMatrix entry.
getTileMatrix()
Returns theTileMatrix for a specific zoom level, or null if none exists.
Zoom level to look up.
The tile matrix describing tile dimensions and pixel sizes at this zoom, or
null.getTileMatrixSet()
Returns theTileMatrixSet that defines the spatial extent and SRS for the entire tile table.
getTileGrid()
Returns aTileGrid representing the full column/row range at the given zoom level, or null.
countAtZoomLevel()
Returns the number of tiles stored at a specific zoom level.TileRow
ATileRow is a single row returned from a tile table query, containing the encoded image bytes and the tile’s position.
getTileData()
Returns the raw encoded image bytes for this tile.The raw image bytes (typically PNG or JPEG).
getTileDataImage()
Decodes the tile bytes and returns aPromise<GeoPackageImage>.