2017-09-30 13:55:44 +03:00
|
|
|
[package]
|
2018-01-16 15:55:05 +03:00
|
|
|
name = "martin"
|
2023-05-09 23:45:55 +03:00
|
|
|
version = "0.8.2"
|
2022-05-27 14:03:48 +03:00
|
|
|
edition = "2021"
|
2022-10-07 20:58:30 +03:00
|
|
|
authors = ["Stepan Kuzmin <to.stepan.kuzmin@gmail.com>", "Yuri Astrakhan <YuriAstrakhan@gmail.com>", "MapLibre contributors"]
|
Add .mbtiles support (#549)
Adds a new [.mbtiles](https://github.com/mapbox/mbtiles-spec/blob/master/1.3/spec.md)
backend, without the grid support. Uses extensive tile content
detection, i.e. if the content is gzipped, png, jpeg, gif, webp.
From CLI, can be as easy as adding a path to a directory that contains a
.mbtiles file (works just like pmtiles support)
```bash
# All *.mbtiles files in this dir will be published.
# The filename will be used as the source ID
martin ./tests/fixtures
```
From configuration file, the path can be specified in a number of ways
(same as pmtiles)
```yaml
mbtiles:
paths:
# scan this whole dir, matching all *.mbtiles files
- /dir-path
# specific mbtiles file will be published as mbtiles2 source
- /path/to/mbtiles2.mbtiles
sources:
# named source matching source name to a single file
pm-src1: /tmp/mbtiles.mbtiles
# named source, where the filename is explicitly set. This way we will be able to add more options later
pm-src2:
path: /tmp/mbtiles.mbtiles
```
Fixes #494
2023-01-09 08:10:23 +03:00
|
|
|
description = "Blazing fast and lightweight tile server with PostGIS, MBTiles, and PMTiles support"
|
2022-10-07 20:58:30 +03:00
|
|
|
repository = "https://github.com/maplibre/martin"
|
2022-07-06 15:25:45 +03:00
|
|
|
license = "MIT OR Apache-2.0"
|
2023-03-25 21:48:28 +03:00
|
|
|
keywords = ["maps", "tiles", "mbtiles", "pmtiles", "postgis"]
|
2023-03-25 21:37:42 +03:00
|
|
|
exclude = [
|
|
|
|
# Tests include a lot of data and other test files that are not needed for the users of the library
|
|
|
|
"/tests",
|
|
|
|
]
|
2019-10-26 20:37:49 +03:00
|
|
|
|
|
|
|
[lib]
|
|
|
|
name = "martin"
|
|
|
|
path = "src/lib.rs"
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "martin"
|
|
|
|
path = "src/bin/main.rs"
|
2017-09-30 13:55:44 +03:00
|
|
|
|
2022-10-07 16:22:32 +03:00
|
|
|
[features]
|
2022-12-13 13:02:38 +03:00
|
|
|
default = []
|
2022-11-19 17:50:27 +03:00
|
|
|
ssl = ["openssl", "postgres-openssl"]
|
|
|
|
vendored-openssl = ["ssl", "openssl/vendored"]
|
2022-10-07 16:22:32 +03:00
|
|
|
|
2017-09-30 13:55:44 +03:00
|
|
|
[dependencies]
|
2022-08-15 16:54:48 +03:00
|
|
|
actix = "0.13"
|
|
|
|
actix-cors = "0.6"
|
|
|
|
actix-http = "3"
|
|
|
|
actix-rt = "2"
|
|
|
|
actix-web = "4"
|
|
|
|
async-trait = "0.1"
|
2023-02-20 18:44:22 +03:00
|
|
|
brotli = "3"
|
2022-10-01 10:48:11 +03:00
|
|
|
clap = { version = "4", features = ["derive"] }
|
2023-02-08 19:55:37 +03:00
|
|
|
deadpool-postgres = "0.10"
|
2022-11-27 05:34:49 +03:00
|
|
|
env_logger = "0.10"
|
2023-02-08 19:55:37 +03:00
|
|
|
flate2 = "1"
|
2022-11-26 12:46:40 +03:00
|
|
|
futures = "0.3"
|
2021-07-16 16:08:46 +03:00
|
|
|
itertools = "0.10"
|
2018-03-26 14:12:43 +03:00
|
|
|
log = "0.4"
|
2023-03-25 21:48:28 +03:00
|
|
|
martin-mbtiles = { path = "martin-mbtiles", version = "0.1.0" }
|
|
|
|
martin-tile-utils = { path = "martin-tile-utils", version = "0.1.0" }
|
2022-08-15 16:54:48 +03:00
|
|
|
num_cpus = "1"
|
2022-11-19 17:50:27 +03:00
|
|
|
openssl = { version = "0.10", optional = true }
|
2023-01-08 22:19:11 +03:00
|
|
|
pmtiles = { version = "0.2", features = ["mmap-async-tokio", "tilejson"] }
|
2022-08-15 16:54:48 +03:00
|
|
|
postgis = "0.9"
|
2022-09-13 09:18:01 +03:00
|
|
|
postgres = { version = "0.19", features = ["with-time-0_3", "with-uuid-1", "with-serde_json-1"] }
|
2022-11-19 17:50:27 +03:00
|
|
|
postgres-openssl = { version = "0.5", optional = true }
|
2022-08-15 16:54:48 +03:00
|
|
|
postgres-protocol = "0.6"
|
2023-02-06 22:32:28 +03:00
|
|
|
regex = "1"
|
2022-08-15 16:54:48 +03:00
|
|
|
semver = "1"
|
2022-10-31 23:28:21 +03:00
|
|
|
serde = { version = "1", features = ["derive"] }
|
2023-02-22 19:25:48 +03:00
|
|
|
serde_json = { version = "1", features = ["preserve_order"] }
|
2022-07-29 12:20:49 +03:00
|
|
|
serde_yaml = "0.9"
|
2022-12-22 09:35:29 +03:00
|
|
|
subst = { version = "0.2", features = ["yaml"] }
|
2022-12-13 13:02:38 +03:00
|
|
|
thiserror = "1"
|
2022-08-15 16:54:48 +03:00
|
|
|
tilejson = "0.3"
|
2019-10-26 20:37:49 +03:00
|
|
|
|
2022-10-05 22:12:44 +03:00
|
|
|
[dev-dependencies]
|
2022-12-10 10:40:01 +03:00
|
|
|
cargo-husky = { version = "1", features = ["user-hooks"], default-features = false }
|
|
|
|
criterion = { version = "0.4", features = ["async_futures", "async_tokio", "html_reports"] }
|
2023-03-29 03:08:13 +03:00
|
|
|
ctor = "0.2"
|
2023-01-31 14:49:43 +03:00
|
|
|
indoc = "2"
|
Support z,x,y and record-returning funcs, table rework (#380)
Can now handle several additional Postgres functions to get a tile, plus
tons of small fixes
### Multiple result variants
* `getmvt(z,x,y) -> [bytea,md5]` (single row with two columns)
* `getmvt(z,x,y) -> [bytea]` (single row with a single column)
* `getmvt(z,x,y) -> bytea` (value)
### Multiple input parameter variants
* `getmvt(z, x, y)` or `getmvt(zoom, x, y)` (all 3 vars must be
integers)
* `getmvt(z, x, y, url_query)`, where instead of `url_query` it could be
any other name, but must be of type JSON
### Breaking
* srid is now the same type as PG -- `i32`
* renamed config vals `table_sources` and `function_sources` into
`tables` and `functions`
### Features and fixes
* if postgis is v3.1+, uses margin parameter to extend the search box by
the size of the buffer. I think we should make 3.1 minimal required.
* fixes feature ID issue from #466
* fixes mixed case names for schemas, tables and columns, functions and
parameter names per #389
### Notes
* More dynamic SQL generation in code instead of using external SQL
files. Those should only be used when they are not parametrized.
* The new function/table discovery mechanism: query for all functions in
the database, and match up those functions with the ones configured (if
any), plus adds all the rest of the un-declared ones if discovery mode
is on.
* During table and function discovery, the code generates a map of
`(PgSqlInfo, FunctionInfo)` (or table) tupples containing SQL needed to
get the tile.
* Auto-discovery mode is currently hidden - the discovery is on only
when no tables or functions are configured. TBD - how to configure it in
the future
* The new system allows for an easy way to auto-discover for the
specific schemas only, solving #47
* predictable order of table/function instantiation
* bounding boxes computed in parallel for all tables (when not
configured)
* proper identifier escaping
* test cleanup
fixes #378
fixes #466
fixes #65
fixes #389
2022-12-10 17:20:42 +03:00
|
|
|
#test-log = "0.2"
|
2022-10-05 22:12:44 +03:00
|
|
|
|
2019-10-26 20:37:49 +03:00
|
|
|
[[bench]]
|
2021-07-23 11:04:34 +03:00
|
|
|
name = "sources"
|
2020-04-26 17:57:13 +03:00
|
|
|
harness = false
|
2023-03-25 21:37:42 +03:00
|
|
|
|
|
|
|
[profile.dev.package.sqlx-macros]
|
|
|
|
# See https://github.com/launchbadge/sqlx#compile-time-verification
|
|
|
|
opt-level = 3
|
|
|
|
|
|
|
|
[workspace]
|
|
|
|
default-members = ["martin-tile-utils", "martin-mbtiles", "."]
|
|
|
|
members = ["martin-tile-utils", "martin-mbtiles"]
|