@osmix/shortbread
v0.0.4
Published
Shortbread schema vector tile encoder for Osmix
Readme
@osmix/shortbread
Shortbread schema vector tile encoder for Osmix. Generates vector tiles following the Shortbread schema specification.
Installation
bun add @osmix/shortbreadUsage
import { Osmix } from "@osmix/osmix"
import { ShortbreadVtEncoder } from "@osmix/shortbread"
// Load OSM data
const osmix = await Osmix.fromPbf(pbfData)
// Create encoder
const encoder = new ShortbreadVtEncoder(osmix.osm)
// Generate a tile
const tile = encoder.getTile([z, x, y])Layers
The encoder generates the following Shortbread-compliant layers:
water- Water bodies (lakes, reservoirs, etc.)water_lines- Rivers, streams, canalsland- Land cover (forests, farmland, residential, etc.)sites- Site areas (parks, zoos, hospitals, etc.)buildings- Building footprintsstreets- Roads and pathsstreet_labels/street_labels_points- Street label placementpois- Points of interestplaces- Place labels (cities, towns, villages)boundary_lines/boundary_labels- Administrative boundariesaddresses- Address pointspublic_transport- Transit featuresaerialways- Ski lifts, gondolasferries- Ferry routesbridges,dams,piers- Infrastructure features
API
WIP
