Skip to main content

Starlet

Spatial tiling, Mapbox Vector Tile (MVT) generation, and on-demand tile serving for large geospatial datasets (GeoParquet / GeoJSON).

The pipeline is: partition a dataset into spatial tiles → build density histograms → (optionally) pre-generate MVTs → serve them over HTTP.

Install

pip install starlet

Requires Python 3.10+. This installs the starlet command-line tool.

Want to work on Starlet itself (run from a clone, run the tests)? See DEVELOPMENT.md.

Quick start

Turn a GeoParquet or GeoJSON file into a running tile server in two commands:

# 1. Build a dataset: partition into tiles + pre-generate vector tiles
starlet build --input data.parquet --outdir datasets/mydata

# 2. Serve it
starlet serve --dir datasets --port 8765

Then open http://localhost:8765 and pick your dataset to explore it on a map.

Commands

Everything is available through the starlet CLI (starlet --help).

Configuration

Starlet supports a TOML configuration file for settings you typically set once and reuse. Make a copy of the file starlet.toml.example and named it starlet.toml. Full details are in docs/CONFIGURATION.md. The configurations in that file will be loaded by default when Starlet runs. You can also pass a file explicitly:

starlet --config /path/to/starlet.toml build --input data.parquet --outdir datasets/mydata

Starlet CLI tools

starlet build — full pipeline (tile + MVT)

starlet build --input data.parquet --outdir datasets/mydata --zoom 8
Flag Default Description
--input (required) Path to a GeoParquet or GeoJSON file
--outdir (required) Output dataset directory
--zoom 7 Maximum MVT zoom level
--partition-size 512mb (GeoJSON) / 128mb (GeoParquet) Target partition size, e.g. 256mb, 1gb
--threshold 0 Minimum feature count per MVT tile
--pmtiles off Also export a single .pmtiles archive
--covering-bbox on Write per-row bbox columns for faster on-demand serving

starlet tile — partition a dataset only

starlet tile --input data.parquet --outdir datasets/mydata
Flag Default Description
--input (required) Path to a GeoParquet or GeoJSON file
--outdir (required) Output dataset directory
--partition-size 512mb (GeoJSON) / 128mb (GeoParquet) Target partition size; the number of tiles is derived from the input size
--sort zorder Within-tile row order: zorder, hilbert, columns, none
--covering-bbox on Write per-row bbox columns for faster on-demand serving
--geom-col geometry Geometry column name (e.g. wkb_geometry for OGR exports)
--compression zstd Parquet compression codec
--seed 42 Random seed for partitioning

starlet mvt — generate vector tiles from a tiled dataset

starlet mvt --dir datasets/mydata --zoom 7 --threshold 100000  # threshold optional; default 0
Flag Default Description
--dir (required) Dataset directory (contains parquet_tiles/ and histograms/)
--zoom 7 Maximum zoom level
--threshold 0 Minimum feature count per tile
--outdir <dir>/mvt/ MVT output directory
--pmtiles config / off Combinen all tiles in a single .pmtiles archive

starlet serve — launch the tile server

starlet serve --dir datasets --port 8765
Flag Default Description
--dir (required) Root directory containing dataset subdirectories
--host 0.0.0.0 Host to bind
--port 8765 Port to bind
--cache-size 256 In-memory tile cache size

starlet info — inspect a dataset

starlet info --dir datasets/mydata

Server API

Once starlet serve is running:

Method Path Description
GET / Interactive dataset selector
GET /api/datasets List all datasets
GET /datasets/<dataset>.json Dataset metadata
GET /<dataset>/<z>/<x>/<y>.mvt Mapbox Vector Tile
GET/POST /datasets/<dataset>/features.<csv|geojson> Download features (optional geometry filter)
GET /api/datasets/<dataset>/stats Attribute statistics

Notes & tips

  • Geometry column not named geometry (common with OGR/pyogrio exports)? Pass --geom-col wkb_geometry.
  • Serving tiles on the fly (zooming past the pre-generated levels)? The default tiling output includes covering bbox columns so the server can prune row groups at read time. Use --no-covering-bbox only when optimizing for smaller Parquet files and batch generation speed.
  • One-file distribution: starlet mvt --pmtiles writes a single datasets/mydata/tiles.pmtiles archive inside the dataset directory. starlet build forwards the same setting to its MVT stage.

Deploying a server

See docs/DEPLOYMENT.md for a step-by-step guide to standing up a production tile server, including a no-root recipe behind an existing Apache install.

License

See the repository for license details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

starlet-0.4.0.tar.gz (124.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

starlet-0.4.0-py3-none-any.whl (142.0 kB view details)

Uploaded Python 3

File details

Details for the file starlet-0.4.0.tar.gz.

File metadata

  • Download URL: starlet-0.4.0.tar.gz
  • Upload date:
  • Size: 124.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for starlet-0.4.0.tar.gz
Algorithm Hash digest
SHA256 095a9190547fe5d1641205212b6d54ef9e9846ce0087600b0e7610f2486efcbb
MD5 218190cca046732ef118d428b6b00cf0
BLAKE2b-256 9ce291f0f182c32c2540141cc35584136640f8055950a186901166ed43e31527

See more details on using hashes here.

Provenance

The following attestation bundles were made for starlet-0.4.0.tar.gz:

Publisher: publish.yml on ucr-bdlab/starlet

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file starlet-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: starlet-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 142.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for starlet-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81d5360d6ec43edccfa84a526e3dfed9ea8719ca0bfd5bb972a624300df8e7b8
MD5 25effae20cef873c37184c5e88d5e605
BLAKE2b-256 9346f5d94c6d3e97f3c34dcbf85ad56421cd91fd6d988fc4d2fae2099dfedb66

See more details on using hashes here.

Provenance

The following attestation bundles were made for starlet-0.4.0-py3-none-any.whl:

Publisher: publish.yml on ucr-bdlab/starlet

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page