Tiles router for xpublish
Project description
xpublish-tiles
Web mapping plugins for Xpublish
Project Overview
This project contains a set of web mapping plugins for Xpublish - a framework for serving xarray datasets via HTTP APIs.
The goal of this project is to transform xarray datasets to raster, vector and other types of tiles, which can then be served via HTTP APIs. To do this, the package implements a set of xpublish plugins:
xpublish_tiles.xpublish.tiles.TilesPlugin: An OGC Tiles conformant plugin for serving raster, vector and other types of tiles.xpublish_tiles.xpublish.wms.WMSPlugin: An OGC Web Map Service conformant plugin for serving raster, vector and other types of tiles.
Development
Sync the environment with uv
uv sync
Run the type checker
uv run ty check
Run the tests
uv run pytest tests --where=local
CLI Usage
The package includes a command-line interface for quickly serving datasets with tiles and WMS endpoints:
uv run xpublish-tiles [OPTIONS]
Options
--port PORT: Port to serve on (default: 8080)--dataset DATASET: Dataset to serve (default: global)global: Generated global dataset with synthetic dataair: Tutorial air temperature dataset- For Arraylake datasets: specify the dataset name in {arraylake_org}/{arraylake_dataset} format (requires Arraylake credentials)
--branch BRANCH: Branch to use for Arraylake datasets (default: main)--group GROUP: Group to use for Arraylake datasets (default: '')--cache: Enable icechunk cache for Arraylake datasets
[!TIP] You can control if the tile servers data loading is async or not with the
XPUBLISH_TILES_ASYNC_LOADenvironment variable (1for async mode,0for sync mode, async is enabled by default). You can also control the zarr concurrency with theZARR_ASYNC__CONCURRENCYenvironment variable (default: 10).
Examples
# Serve synthetic global dataset on default port 8080
xpublish-tiles
# Serve air temperature tutorial dataset on port 9000
xpublish-tiles --port 9000 --dataset air
# Serve Arraylake dataset with specific branch and group
xpublish-tiles --dataset earthmover-public/aifs-outputs --branch main --group 2025-04-01/12z --cache
Once running, the server provides:
- Tiles API at
http://localhost:8080/tiles/ - WMS API at
http://localhost:8080/wms/ - Interactive API documentation at
http://localhost:8080/docs
An example tile url:
http://localhost:8080/tiles/WebMercatorQuad/4/4/14?variables=2t&style=raster/viridis&colorscalerange=280,300&width=256&height=256&valid_time=2025-04-03T06:00:00
Where 4/4/14 represents the tile coordinates in {z}/{y}/{x}
Integration Examples
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xpublish_tiles-0.1.1.tar.gz.
File metadata
- Download URL: xpublish_tiles-0.1.1.tar.gz
- Upload date:
- Size: 3.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e424f7dc798c751e45ed04b3c4e322f754c1431f1c15d5ac30facf283d15f49f
|
|
| MD5 |
c05003dd3ea9308c0e852111e7f38dbb
|
|
| BLAKE2b-256 |
7f2e4650a08bd898807636617610cc19940f76927b1b73cf333af7854f26bde3
|
Provenance
The following attestation bundles were made for xpublish_tiles-0.1.1.tar.gz:
Publisher:
publish.yml on earth-mover/xpublish-tiles
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xpublish_tiles-0.1.1.tar.gz -
Subject digest:
e424f7dc798c751e45ed04b3c4e322f754c1431f1c15d5ac30facf283d15f49f - Sigstore transparency entry: 385328359
- Sigstore integration time:
-
Permalink:
earth-mover/xpublish-tiles@7c00e2d8cd6b79da8cd3207d510468ac081ed069 -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/earth-mover
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7c00e2d8cd6b79da8cd3207d510468ac081ed069 -
Trigger Event:
push
-
Statement type:
File details
Details for the file xpublish_tiles-0.1.1-py3-none-any.whl.
File metadata
- Download URL: xpublish_tiles-0.1.1-py3-none-any.whl
- Upload date:
- Size: 50.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97ff21ef0cad053b023922069382ddfa303e8e8e186a3e1814bfbf914db8fb53
|
|
| MD5 |
c2b0daa202a49fe309ac12a5d8b2bdd8
|
|
| BLAKE2b-256 |
b78b07357de3d08e8f7013251aad79654a7ab3116a09ff5397019ee683deb9e1
|
Provenance
The following attestation bundles were made for xpublish_tiles-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on earth-mover/xpublish-tiles
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xpublish_tiles-0.1.1-py3-none-any.whl -
Subject digest:
97ff21ef0cad053b023922069382ddfa303e8e8e186a3e1814bfbf914db8fb53 - Sigstore transparency entry: 385328380
- Sigstore integration time:
-
Permalink:
earth-mover/xpublish-tiles@7c00e2d8cd6b79da8cd3207d510468ac081ed069 -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/earth-mover
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7c00e2d8cd6b79da8cd3207d510468ac081ed069 -
Trigger Event:
push
-
Statement type: