Skip to content

Add hakunapi-tiles-source-vectortile: Java MVT generator source - #240

Merged
jampukka merged 1 commit into
nlsfi:mainfrom
jampukka:tiles/source-vectortile
Oct 16, 2026
Merged

jampukka merged 1 commit into
nlsfi:mainfrom
jampukka:tiles/source-vectortile

Conversation

@jampukka

Copy link
Copy Markdown
Collaborator

Adds the community module that renders Mapbox Vector Tiles on the fly from feature collections.

  • VectorTileGeneratorSource
    • The VectorTileSource registered as vectortile-generator: resolves a tile address to a ground bbox (TileContext) and hands it to the layer's generator
    • Generator is chosen by type id (vectortile.generator, or service-wide default.tiles.layers.vectortile.generator); tiles.vector=true auto-publishes every geometry collection through it
  • VectorTileGenerator / VectorTileGeneratorProvider
    • ServiceLoader SPI for swappable generators; the provider fails on duplicate type ids. EmptyVectorTileGenerator (empty) produces a valid empty tile for routing and conformance checks
  • JavaVectorTileGenerator
    • The in-JVM generator: reads geometry through NavigableHakunaGeometry, fuses the world-to-tile transform into one pass (geom.RingLoad), clips, snaps/simplifies and encodes straight into the layer encoder
    • Per-type writers (MvtPointGeometryWriter, MvtLineGeometryWriter, MvtPolygonGeometryWriter) over AbstractMvtGeometryWriter
  • mvt package
    • MvtLayerEncoder encodes one layer back-to-front with key/value dedup; BackwardProtoBuf is the back-to-front chunked buffer; MvtTileWriter streams the tile out
  • No new third-party dependencies

@jampukka
jampukka merged commit fedea96 into nlsfi:main Oct 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant