9d5f05e824
Bumps [pmtiles](https://github.com/stadiamaps/pmtiles-rs) from 0.5.0 to 0.5.1. <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/stadiamaps/pmtiles-rs/commits">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pmtiles&package-manager=cargo&previous-version=0.5.0&new-version=0.5.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
---|---|---|
.cargo-husky/hooks | ||
.github | ||
debian | ||
demo | ||
docs | ||
martin | ||
martin-tile-utils | ||
mbtiles | ||
tests | ||
.dockerignore | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
docker-compose.yml | ||
justfile | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
logo.png | ||
README.md | ||
rustfmt.toml | ||
SECURITY_POLICY.txt |
Martin is a tile server able to generate and serve vector tiles on the fly from large PostGIS databases, PMTile, and MBTile files, allowing multiple tile sources to be dynamically combined into one. Martin optimizes for speed and heavy traffic, and is written in Rust.
Additionally, there are several tools for generating tiles in bulk from any Martin-supported sources (similar to tilelive-copy
), copying tiles between MBTiles files, creating deltas (patches) and applying them, and validating MBTiles files.
See Martin book for complete documentation.
Installation
See installation instructions in the Martin book.
Prerequisites: If using Martin with PostgreSQL database, you must install PostGIS with at least v3.0+, v3.1+ recommended.
You can download martin from GitHub releases page.
Platform | AMD-64 | ARM-64 |
---|---|---|
Linux | .tar.gz (gnu) .tar.gz (musl) .deb |
.tar.gz (musl) |
macOS | .tar.gz | .tar.gz |
Windows | .zip |
If you are using macOS and Homebrew you can install martin
and mbtiles
using Homebrew tap.
brew tap maplibre/martin
brew install martin
Running Martin Service
See running instructions in the Martin book.
Martin supports any number of PostgreSQL/PostGIS database connections with geospatial-enabled tables and tile-producing SQL functions, as well as PMTile and MBTile files as tile sources.
Martin can auto-discover tables and functions using a connection string. A PG connection string can also be passed via the DATABASE_URL
environment variable.
Each tile source will have a TileJSON endpoint.
Examples
# publish all tables and functions from a single database
export DATABASE_URL="postgresql://user:password@host:port/database"
martin
# same as above, but passing connection string via CLI, together with a directory of .mbtiles/.pmtiles files
martin postgresql://user:password@host:port/database path/to/dir
# publish all discovered tables/funcs from two DBs
# and generate config file with all detected sources
martin postgres://... postgres://... --save-config config.yaml
# use configuration file instead of auto-discovery
martin --config config.yaml
Docker Example
See Docker instructions in the Martin book.
Martin is also available as a Docker image. You could either share a configuration file from the host with the container via the -v
param, or you can let Martin auto-discover all sources e.g. by passing DATABASE_URL
or specifying the .mbtiles/.pmtiles files.
export PGPASSWORD=postgres # secret!
docker run -p 3000:3000 \
-e PGPASSWORD \
-e DATABASE_URL=postgresql://user@host:port/db \
-v /path/to/config/dir:/config \
ghcr.io/maplibre/martin --config /config/config.yaml
API
See API documentation in the Martin book.
Martin data is available via the HTTP GET
endpoints:
URL | Description |
---|---|
/ |
Status text, that will eventually show web UI |
/catalog |
List of all sources |
/{sourceID} |
Source TileJSON |
/{sourceID}/{z}/{x}/{y} |
Map Tiles |
/{source1},…,{sourceN} |
Composite Source TileJSON |
/{source1},…,{sourceN}/{z}/{x}/{y} |
Composite Source Tiles |
/sprite/{spriteID}[@2x].{json,png} |
Sprites (low and high DPI, index/png) |
/font/{font}/{start}-{end} |
Font source |
/font/{font1},…,{fontN}/{start}-{end} |
Composite Font source |
/health |
Martin server health check: returns 200 OK |
Documentation
See Martin book for complete documentation.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.