Repository navigation
Add hakunapi-tiles-source-pmtiles: tile sources reading PMTiles v3 archives - #242
Merged
Merged
Conversation
…g PMTiles v3 archives
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the community module that serves tiles from a PMTiles v3 archive, read in place from a local file or over HTTP range requests, through the
MapTileSourceandVectorTileSourceSPIs. Not wired into the reference webapp. Reading only: the archive writer comes with the tile generator PR.PMTilesArchiveTileIdDirectoryfindreturning the entry that covers a tile id. A run length of 0 marks a pointer to a leaf directory.RangeReaderFileRangeReader: positional reads on one channel, so concurrent tile requests need no lock.HttpRangeReader: oneRangerequest per read.TileIndex/BoxedTileIndexpmtiles.sendfileis set. On those layers a request does no directory I/O; otherwise a tile read walks the directories.BoxedTileIndexis a dense array per zoom, used only when every zoom's bounding box is at least half filled. Otherwise the sortedTileIndexserves.PMTilesTileSource/PMTilesVectorTileSourcepmtiles) and vector (pmtiles-vector) sources, sharing one config parser. Tile bytes are relayed as stored, never decoded.hakunapi-bytescan not be used from a Java 21 module; migration is the intent.Behaviour:
pmtilesorpmtiles-vectorlayer is configuredRangeand answers 200 is an errortile_compressionbrotli and zstd are served withContent-Encoding: brandzstd, gzip asgzip; an archive without tile compression is served without the headerpmtiles.sendfileis accepted only forpmtiles-vector, and needspmtiles.path; forpmtilesit fails at startuppmtiles-vector, a raster archive needspmtiles; a mismatch fails at startup