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
|
|
|
{
|
|
|
|
"db": "SQLite",
|
2023-06-03 03:40:22 +03:00
|
|
|
"386a375cf65c3e5aef51deffc99d23bd852ba445c1058aed380fe83bed618c29": {
|
|
|
|
"describe": {
|
|
|
|
"columns": [
|
|
|
|
{
|
|
|
|
"name": "value",
|
|
|
|
"ordinal": 0,
|
|
|
|
"type_info": "Text"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"nullable": [
|
|
|
|
true
|
|
|
|
],
|
|
|
|
"parameters": {
|
|
|
|
"Right": 1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"query": "SELECT value from metadata where name = ?"
|
|
|
|
},
|
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
|
|
|
"5b298df51dccbf0d8a22433a99febc59c27dbf204d09a9c1fb0b3bf9aaad284b": {
|
|
|
|
"describe": {
|
|
|
|
"columns": [
|
|
|
|
{
|
|
|
|
"name": "tile_column",
|
|
|
|
"ordinal": 0,
|
|
|
|
"type_info": "Int64"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "tile_row",
|
|
|
|
"ordinal": 1,
|
|
|
|
"type_info": "Int64"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "tile_data",
|
|
|
|
"ordinal": 2,
|
|
|
|
"type_info": "Blob"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"nullable": [
|
|
|
|
true,
|
|
|
|
true,
|
|
|
|
true
|
|
|
|
],
|
|
|
|
"parameters": {
|
|
|
|
"Right": 1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"query": "SELECT tile_column, tile_row, tile_data FROM tiles WHERE zoom_level = ? LIMIT 1"
|
|
|
|
},
|
|
|
|
"60264fa07915878b3f7ba0067f48c3a379e96acbdf5fc52d14e29bc726fefab7": {
|
|
|
|
"describe": {
|
|
|
|
"columns": [
|
|
|
|
{
|
|
|
|
"name": "tile_data",
|
|
|
|
"ordinal": 0,
|
|
|
|
"type_info": "Blob"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"nullable": [
|
|
|
|
true
|
|
|
|
],
|
|
|
|
"parameters": {
|
|
|
|
"Right": 3
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"query": "SELECT tile_data from tiles where zoom_level = ? AND tile_column = ? AND tile_row = ?"
|
|
|
|
},
|
|
|
|
"748436831449877b242d6e167a2f8fe1b1e7b6fb87c4e04ad7406a2bbfd35bec": {
|
|
|
|
"describe": {
|
|
|
|
"columns": [
|
|
|
|
{
|
|
|
|
"name": "zoom_level",
|
|
|
|
"ordinal": 0,
|
|
|
|
"type_info": "Int64"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "tile_column",
|
|
|
|
"ordinal": 1,
|
|
|
|
"type_info": "Int64"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "tile_row",
|
|
|
|
"ordinal": 2,
|
|
|
|
"type_info": "Int64"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "tile_data",
|
|
|
|
"ordinal": 3,
|
|
|
|
"type_info": "Blob"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"nullable": [
|
|
|
|
true,
|
|
|
|
true,
|
|
|
|
true,
|
|
|
|
true
|
|
|
|
],
|
|
|
|
"parameters": {
|
|
|
|
"Right": 0
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"query": "SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles WHERE zoom_level >= 0 LIMIT 1"
|
|
|
|
},
|
|
|
|
"d6ac76a234c97d0dc1fc4331d8b2cd90903d5401f8f0956245e5163bedd23a4d": {
|
|
|
|
"describe": {
|
|
|
|
"columns": [
|
|
|
|
{
|
|
|
|
"name": "name",
|
|
|
|
"ordinal": 0,
|
|
|
|
"type_info": "Text"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "value",
|
|
|
|
"ordinal": 1,
|
|
|
|
"type_info": "Text"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"nullable": [
|
|
|
|
true,
|
|
|
|
true
|
|
|
|
],
|
|
|
|
"parameters": {
|
|
|
|
"Right": 0
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"query": "SELECT name, value FROM metadata WHERE value IS NOT ''"
|
|
|
|
}
|
|
|
|
}
|