-
-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PG TileJSON changes, add vector_layers (#584)
* make tilejson's `name` be the same as the ID of the source (even if aliased) * `/catalog` will always show ID, but now it will hide the `name` if it is the same as the `id` * make `description` be the longer version, e.g. `public.table.column` format - not guaranteed to be stable * make `vector_layers` have the fields auto-discovered in the PG table * preserve the order of the serialized json fields Fixes #583
- Loading branch information
Showing
25 changed files
with
267 additions
and
183 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ opt-level = 3 | |
|
||
[package] | ||
name = "martin" | ||
version = "0.7.1" | ||
version = "0.7.2" | ||
edition = "2021" | ||
authors = ["Stepan Kuzmin <[email protected]>", "Yuri Astrakhan <[email protected]>", "MapLibre contributors"] | ||
description = "Blazing fast and lightweight tile server with PostGIS, MBTiles, and PMTiles support" | ||
|
@@ -56,7 +56,7 @@ postgres-protocol = "0.6" | |
regex = "1" | ||
semver = "1" | ||
serde = { version = "1", features = ["derive"] } | ||
serde_json = "1" | ||
serde_json = { version = "1", features = ["preserve_order"] } | ||
serde_yaml = "0.9" | ||
subst = { version = "0.2", features = ["yaml"] } | ||
thiserror = "1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,162 +1,162 @@ | ||
[ | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"id": "MixPoints", | ||
"name": "MixedCase.MixPoints.Geom" | ||
"content_type": "application/x-protobuf", | ||
"description": "MixedCase.MixPoints.Geom" | ||
}, | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"id": "function_Mixed_Name", | ||
"name": "MixedCase.function_Mixed_Name" | ||
"content_type": "application/x-protobuf", | ||
"description": "MixedCase.function_Mixed_Name" | ||
}, | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"id": "function_null", | ||
"name": "public.function_null" | ||
"content_type": "application/x-protobuf", | ||
"description": "public.function_null" | ||
}, | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"id": "function_null_row", | ||
"name": "public.function_null_row" | ||
"content_type": "application/x-protobuf", | ||
"description": "public.function_null_row" | ||
}, | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"id": "function_null_row2", | ||
"name": "public.function_null_row2" | ||
"content_type": "application/x-protobuf", | ||
"description": "public.function_null_row2" | ||
}, | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"id": "function_zoom_xy", | ||
"name": "public.function_zoom_xy" | ||
"content_type": "application/x-protobuf", | ||
"description": "public.function_zoom_xy" | ||
}, | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"id": "function_zxy", | ||
"name": "public.function_zxy" | ||
"content_type": "application/x-protobuf", | ||
"description": "public.function_zxy" | ||
}, | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"id": "function_zxy2", | ||
"name": "public.function_zxy2" | ||
"content_type": "application/x-protobuf", | ||
"description": "public.function_zxy2" | ||
}, | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"id": "function_zxy_query", | ||
"name": "public.function_zxy_query" | ||
"content_type": "application/x-protobuf", | ||
"description": "public.function_zxy_query" | ||
}, | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"id": "function_zxy_query_jsonb", | ||
"name": "public.function_zxy_query_jsonb" | ||
"content_type": "application/x-protobuf", | ||
"description": "public.function_zxy_query_jsonb" | ||
}, | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"id": "function_zxy_query_test", | ||
"name": "public.function_zxy_query_test" | ||
"content_type": "application/x-protobuf", | ||
"description": "public.function_zxy_query_test" | ||
}, | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"id": "function_zxy_row", | ||
"name": "public.function_zxy_row" | ||
"content_type": "application/x-protobuf", | ||
"description": "public.function_zxy_row" | ||
}, | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"id": "function_zxy_row_key", | ||
"name": "public.function_zxy_row_key" | ||
"content_type": "application/x-protobuf", | ||
"description": "public.function_zxy_row_key" | ||
}, | ||
{ | ||
"content_type": "image/jpeg", | ||
"description": "One of the example maps that comes with TileMill - a bright & colorful world map that blends retro and high-tech with its folded paper texture and interactive flag tooltips. ", | ||
"id": "geography-class-jpg", | ||
"name": "Geography Class" | ||
"content_type": "image/jpeg", | ||
"name": "Geography Class", | ||
"description": "One of the example maps that comes with TileMill - a bright & colorful world map that blends retro and high-tech with its folded paper texture and interactive flag tooltips. " | ||
}, | ||
{ | ||
"content_type": "image/png", | ||
"description": "One of the example maps that comes with TileMill - a bright & colorful world map that blends retro and high-tech with its folded paper texture and interactive flag tooltips. ", | ||
"id": "geography-class-png", | ||
"name": "Geography Class" | ||
"content_type": "image/png", | ||
"name": "Geography Class", | ||
"description": "One of the example maps that comes with TileMill - a bright & colorful world map that blends retro and high-tech with its folded paper texture and interactive flag tooltips. " | ||
}, | ||
{ | ||
"content_type": "image/png", | ||
"description": "One of the example maps that comes with TileMill - a bright & colorful world map that blends retro and high-tech with its folded paper texture and interactive flag tooltips. ", | ||
"id": "geography-class-png-no-bounds", | ||
"name": "Geography Class" | ||
"content_type": "image/png", | ||
"name": "Geography Class", | ||
"description": "One of the example maps that comes with TileMill - a bright & colorful world map that blends retro and high-tech with its folded paper texture and interactive flag tooltips. " | ||
}, | ||
{ | ||
"content_type": "application/json", | ||
"id": "json", | ||
"content_type": "application/json", | ||
"name": "Dummy json data" | ||
}, | ||
{ | ||
"content_type": "image/png", | ||
"id": "png", | ||
"content_type": "image/png", | ||
"name": "ne2sr" | ||
}, | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"id": "points1", | ||
"name": "public.points1.geom" | ||
"content_type": "application/x-protobuf", | ||
"description": "public.points1.geom" | ||
}, | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"id": "points1_vw", | ||
"name": "public.points1_vw.geom" | ||
"content_type": "application/x-protobuf", | ||
"description": "public.points1_vw.geom" | ||
}, | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"id": "points2", | ||
"name": "public.points2.geom" | ||
"content_type": "application/x-protobuf", | ||
"description": "public.points2.geom" | ||
}, | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"id": "points3857", | ||
"name": "public.points3857.geom" | ||
"content_type": "application/x-protobuf", | ||
"description": "public.points3857.geom" | ||
}, | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"id": "points_empty_srid", | ||
"name": "public.points_empty_srid.geom" | ||
"content_type": "application/x-protobuf", | ||
"description": "public.points_empty_srid.geom" | ||
}, | ||
{ | ||
"content_type": "image/png", | ||
"id": "stamen_toner__raster_CC-BY-ODbL_z3" | ||
"id": "stamen_toner__raster_CC-BY-ODbL_z3", | ||
"content_type": "image/png" | ||
}, | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"id": "table_source", | ||
"name": "public.table_source.geom" | ||
"content_type": "application/x-protobuf", | ||
"description": "public.table_source.geom" | ||
}, | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"id": "table_source_multiple_geom", | ||
"name": "public.table_source_multiple_geom.geom1" | ||
"content_type": "application/x-protobuf", | ||
"description": "public.table_source_multiple_geom.geom1" | ||
}, | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"id": "table_source_multiple_geom.1", | ||
"name": "public.table_source_multiple_geom.geom2" | ||
"content_type": "application/x-protobuf", | ||
"description": "public.table_source_multiple_geom.geom2" | ||
}, | ||
{ | ||
"content_type": "application/x-protobuf", | ||
"description": "Major cities from Natural Earth data", | ||
"id": "uncompressed_mvt", | ||
"name": "Major cities from Natural Earth data" | ||
"content_type": "application/x-protobuf", | ||
"name": "Major cities from Natural Earth data", | ||
"description": "Major cities from Natural Earth data" | ||
}, | ||
{ | ||
"content_type": "image/webp", | ||
"id": "webp", | ||
"content_type": "image/webp", | ||
"name": "ne2sr" | ||
}, | ||
{ | ||
"content_type": "image/webp", | ||
"id": "webp.1", | ||
"content_type": "image/webp", | ||
"name": "ne2sr" | ||
}, | ||
{ | ||
"content_encoding": "gzip", | ||
"content_type": "application/x-protobuf", | ||
"description": "Major cities from Natural Earth data", | ||
"id": "world_cities", | ||
"name": "Major cities from Natural Earth data" | ||
"content_type": "application/x-protobuf", | ||
"content_encoding": "gzip", | ||
"name": "Major cities from Natural Earth data", | ||
"description": "Major cities from Natural Earth data" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
{ | ||
"name": "public.table_source.geom", | ||
"tilejson": "3.0.0", | ||
"tiles": [ | ||
"http://localhost:3111/table_source,points1,points2/{z}/{x}/{y}" | ||
] | ||
], | ||
"vector_layers": [ | ||
{ | ||
"id": "table_source", | ||
"fields": { | ||
"gid": "int4" | ||
} | ||
} | ||
], | ||
"description": "public.table_source.geom", | ||
"name": "table_source" | ||
} |
Oops, something went wrong.