2023-11-17 21:55:05 +03:00
|
|
|
lints.workspace = true
|
|
|
|
|
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
|
|
|
[package]
|
2023-10-28 11:50:49 +03:00
|
|
|
name = "mbtiles"
|
2023-12-06 07:48:59 +03:00
|
|
|
version = "0.8.2"
|
2023-03-25 21:37:42 +03:00
|
|
|
authors = ["Yuri Astrakhan <YuriAstrakhan@gmail.com>", "MapLibre contributors"]
|
|
|
|
description = "A simple low-level MbTiles access and processing library, with some tile format detection and other relevant heuristics."
|
2023-03-25 21:44:36 +03:00
|
|
|
keywords = ["mbtiles", "maps", "tiles", "mvt", "tilejson"]
|
2023-10-31 01:52:21 +03:00
|
|
|
categories = ["science::geo", "database"]
|
2023-06-01 16:05:06 +03:00
|
|
|
edition.workspace = true
|
|
|
|
license.workspace = true
|
2023-07-06 03:56:23 +03:00
|
|
|
repository.workspace = true
|
|
|
|
rust-version.workspace = true
|
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
|
|
|
|
2023-06-04 01:54:50 +03:00
|
|
|
[features]
|
2023-09-30 03:40:32 +03:00
|
|
|
default = ["cli"]
|
|
|
|
cli = ["dep:anyhow", "dep:clap", "dep:env_logger", "dep:serde_yaml", "dep:tokio"]
|
2023-06-04 01:54:50 +03:00
|
|
|
|
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
|
|
|
[dependencies]
|
2023-10-10 18:10:17 +03:00
|
|
|
enum-display.workspace = true
|
2023-06-01 16:05:06 +03:00
|
|
|
futures.workspace = true
|
|
|
|
log.workspace = true
|
2023-06-04 01:54:50 +03:00
|
|
|
martin-tile-utils.workspace = true
|
2023-06-01 16:05:06 +03:00
|
|
|
serde_json.workspace = true
|
2023-11-13 09:03:40 +03:00
|
|
|
serde.workspace = true
|
2023-11-13 06:22:04 +03:00
|
|
|
serde_with.workspace = true
|
2023-11-13 09:03:40 +03:00
|
|
|
size_format.workspace = true
|
2023-09-30 03:40:32 +03:00
|
|
|
sqlite-hashes.workspace = true
|
2023-06-01 16:05:06 +03:00
|
|
|
sqlx.workspace = true
|
|
|
|
thiserror.workspace = true
|
|
|
|
tilejson.workspace = true
|
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
|
|
|
|
2023-06-01 17:13:20 +03:00
|
|
|
# Bin dependencies
|
2023-06-04 01:54:50 +03:00
|
|
|
anyhow = { workspace = true, optional = true }
|
|
|
|
clap = { workspace = true, optional = true }
|
2023-09-29 21:37:18 +03:00
|
|
|
env_logger = { workspace = true, optional = true }
|
2023-09-30 03:40:32 +03:00
|
|
|
serde_yaml = { workspace = true, optional = true }
|
2023-07-04 15:05:23 +03:00
|
|
|
tokio = { workspace = true, features = ["rt-multi-thread"], optional = true }
|
2023-06-01 17:13:20 +03:00
|
|
|
|
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
|
|
|
[dev-dependencies]
|
|
|
|
# For testing, might as well use the same async framework as the Martin itself
|
2023-06-01 16:05:06 +03:00
|
|
|
actix-rt.workspace = true
|
2023-11-13 09:03:40 +03:00
|
|
|
approx.workspace = true
|
2023-10-10 18:10:17 +03:00
|
|
|
ctor.workspace = true
|
|
|
|
env_logger.workspace = true
|
2023-11-13 09:03:40 +03:00
|
|
|
insta = { workspace = true, features = ["toml", "yaml"] }
|
2023-10-10 18:10:17 +03:00
|
|
|
pretty_assertions.workspace = true
|
|
|
|
rstest.workspace = true
|
2023-06-01 17:13:20 +03:00
|
|
|
|
|
|
|
[lib]
|
|
|
|
path = "src/lib.rs"
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "mbtiles"
|
2023-11-17 03:59:43 +03:00
|
|
|
path = "src/bin/mbtiles.rs"
|
2023-06-17 02:11:13 +03:00
|
|
|
required-features = ["cli"]
|