├── .dockerignore ├── .github ├── FUNDING.yml ├── dependabot.yml ├── files │ ├── config.markdownlint-cli2.jsonc │ ├── homebrew.martin.rb.j2 │ ├── lambda-function │ │ ├── Makefile │ │ └── config.yaml │ ├── lambda-layer │ │ └── bootstrap │ ├── lambda.yaml │ ├── markdown.links.config.json │ └── multi-platform.Dockerfile └── workflows │ ├── audit-check.yml │ ├── bench.yml │ ├── build-deploy-docs.yml │ ├── ci.yml │ ├── coverage.yml │ ├── demo.yml │ ├── dependabot.yml │ └── release.yml ├── .gitignore ├── .pre-commit-config.yaml ├── CHANGELOG.md ├── CITATION.cff ├── CODE_OF_CONDUCT.md ├── Cargo.lock ├── Cargo.toml ├── Cross.toml ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md ├── SECURITY.md ├── clippy.toml ├── debian ├── config.yaml └── martin.service ├── demo ├── .dockerignore ├── .gitignore ├── README.md ├── certs │ ├── cert.pem │ └── private.pem ├── db │ ├── Dockerfile │ ├── csv-data-actual-headers │ └── initdb │ │ ├── 01.sql │ │ ├── 02.sh │ │ └── 03.sql ├── docker-compose.yml ├── frontend │ ├── .dockerignore │ ├── .eslintrc │ ├── Dockerfile │ ├── dev.Dockerfile │ ├── index.html │ ├── nginx.conf │ ├── package.json │ ├── public │ │ ├── favicon.ico │ │ └── martin.png │ ├── src │ │ ├── Components │ │ │ ├── App │ │ │ │ ├── App.jsx │ │ │ │ ├── GlobalStyle.ts │ │ │ │ ├── fonts │ │ │ │ │ ├── vremenagroteskbold.woff │ │ │ │ │ ├── vremenagroteskbold.woff2 │ │ │ │ │ ├── vremenagroteskbook.woff │ │ │ │ │ └── vremenagroteskbook.woff2 │ │ │ │ └── index.ts │ │ │ ├── Description.ts │ │ │ ├── Development │ │ │ │ ├── Container.ts │ │ │ │ ├── Development.tsx │ │ │ │ ├── Title.ts │ │ │ │ └── index.ts │ │ │ ├── Fatures │ │ │ │ ├── Container.ts │ │ │ │ ├── Description.ts │ │ │ │ ├── Feature.ts │ │ │ │ ├── Features.tsx │ │ │ │ ├── Title.ts │ │ │ │ ├── index.ts │ │ │ │ └── martin_mobile.png │ │ │ ├── Footer │ │ │ │ ├── Container.js │ │ │ │ ├── Description.js │ │ │ │ ├── Footer.jsx │ │ │ │ ├── arrow.svg │ │ │ │ ├── index.js │ │ │ │ ├── maplibre-logo-big.svg │ │ │ │ └── urbica.svg │ │ │ ├── GitHubButton │ │ │ │ ├── Container.ts │ │ │ │ ├── DocsButton.tsx │ │ │ │ ├── GitHubButton.tsx │ │ │ │ ├── index.ts │ │ │ │ └── octocat.svg │ │ │ ├── Intro │ │ │ │ ├── Container.ts │ │ │ │ ├── Description.ts │ │ │ │ ├── Intro.tsx │ │ │ │ ├── Title.ts │ │ │ │ ├── index.ts │ │ │ │ └── logo_martin.svg │ │ │ ├── Map │ │ │ │ ├── Container.ts │ │ │ │ ├── Filters │ │ │ │ │ ├── AvgTime.ts │ │ │ │ │ ├── CaptionElement │ │ │ │ │ │ ├── CaptionElement.tsx │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── Container.ts │ │ │ │ │ ├── DayPicker.ts │ │ │ │ │ ├── Filters.tsx │ │ │ │ │ ├── Input.ts │ │ │ │ │ ├── Layers │ │ │ │ │ │ ├── Description.ts │ │ │ │ │ │ ├── Layer.ts │ │ │ │ │ │ ├── Layers.jsx │ │ │ │ │ │ ├── Legend.ts │ │ │ │ │ │ ├── Title.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── Range.ts │ │ │ │ │ ├── Separator.ts │ │ │ │ │ ├── TimePicker.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── Map.tsx │ │ │ │ └── index.ts │ │ │ ├── MobileMap.ts │ │ │ └── TryIt.ts │ │ ├── config │ │ │ ├── constants.ts │ │ │ ├── features.ts │ │ │ └── layers.ts │ │ ├── index.tsx │ │ └── utils │ │ │ ├── dateConverter.ts │ │ │ └── getColorsFromLayer.ts │ ├── tsconfig.json │ ├── vite.config.ts │ └── yarn.lock └── justfile ├── docker-compose.yml ├── docs ├── README.md ├── book.toml └── src │ ├── SUMMARY.md │ ├── config-file.md │ ├── development.md │ ├── env-vars.md │ ├── getting-involved.md │ ├── images │ ├── maputnik-add-layer.png │ ├── maputnik-add-tilejson.png │ ├── maputnik-add-yachts-layer.png │ ├── maputnik-change-datasource.png │ ├── maputnik-configure-layer.png │ ├── maputnik-open.png │ ├── maputnik-select-style.png │ ├── maputnik-zoom-into-monaco.png │ ├── qgis_add_to_layers.png │ ├── qgis_add_vector_tile.png │ ├── qgis_add_vector_tile_options.png │ ├── qgis_shows_in_the_map.png │ └── sources-sprites.png │ ├── installation.md │ ├── introduction.md │ ├── martin-as-a-library.md │ ├── martin-cp.md │ ├── mbtiles-copy.md │ ├── mbtiles-diff.md │ ├── mbtiles-meta.md │ ├── mbtiles-schema.md │ ├── mbtiles-validation.md │ ├── mbtiles.md │ ├── pg-connections.md │ ├── quick-start-linux.md │ ├── quick-start-macos.md │ ├── quick-start-qgis.md │ ├── quick-start-windows.md │ ├── quick-start.md │ ├── recipe-basemap-postgis.md │ ├── recipes.md │ ├── run-hosting-environment.md │ ├── run-with-apache.md │ ├── run-with-cli.md │ ├── run-with-docker-compose.md │ ├── run-with-docker.md │ ├── run-with-lambda.md │ ├── run-with-nginx.md │ ├── run-with-reverse-proxy.md │ ├── run.md │ ├── sources-cog-files.md │ ├── sources-composite.md │ ├── sources-files.md │ ├── sources-fonts.md │ ├── sources-pg-functions.md │ ├── sources-pg-tables.md │ ├── sources-resources.md │ ├── sources-sprites.md │ ├── sources-styles.md │ ├── sources-tiles.md │ ├── tools.md │ ├── troubleshooting.md │ ├── using-guides.md │ ├── using-with-data.md │ ├── using-with-deck-gl.md │ ├── using-with-leaflet.md │ ├── using-with-mapbox.md │ ├── using-with-maplibre.md │ ├── using-with-openlayers.md │ ├── using-with-renderer.md │ └── using.md ├── justfile ├── logo.png ├── martin-tile-utils ├── Cargo.toml ├── README.md ├── fixtures │ ├── dc.webp │ ├── world.jpg │ └── world.png └── src │ ├── decoders.rs │ └── lib.rs ├── martin ├── Cargo.toml ├── README.md ├── benches │ └── bench.rs ├── build.rs ├── martin-ui │ ├── .eslintrc.cjs │ ├── README.md │ ├── index.html │ ├── package-lock.json │ ├── package.json │ ├── public │ │ └── _ │ │ │ └── assets │ │ │ └── favicon.ico │ ├── src │ │ ├── App.css │ │ ├── App.tsx │ │ ├── assets │ │ │ └── logo.png │ │ ├── index.css │ │ ├── main.tsx │ │ └── vite-env.d.ts │ ├── tsconfig.json │ ├── tsconfig.node.json │ └── vite.config.ts ├── release.toml ├── src │ ├── args │ │ ├── connections.rs │ │ ├── environment.rs │ │ ├── mod.rs │ │ ├── pg.rs │ │ ├── root.rs │ │ └── srv.rs │ ├── bin │ │ ├── martin-cp.rs │ │ └── martin.rs │ ├── cog │ │ ├── config.rs │ │ ├── errors.rs │ │ ├── mod.rs │ │ ├── model.rs │ │ └── source.rs │ ├── config.rs │ ├── file_config.rs │ ├── fonts │ │ └── mod.rs │ ├── lib.rs │ ├── mbtiles │ │ └── mod.rs │ ├── pg │ │ ├── builder.rs │ │ ├── config.rs │ │ ├── config_function.rs │ │ ├── config_table.rs │ │ ├── errors.rs │ │ ├── mod.rs │ │ ├── pg_source.rs │ │ ├── pool.rs │ │ ├── query_functions.rs │ │ ├── query_tables.rs │ │ ├── scripts │ │ │ ├── query_available_function.sql │ │ │ └── query_available_tables.sql │ │ ├── tls.rs │ │ └── utils.rs │ ├── pmtiles │ │ └── mod.rs │ ├── source.rs │ ├── sprites │ │ └── mod.rs │ ├── srv │ │ ├── config.rs │ │ ├── cors.rs │ │ ├── fonts.rs │ │ ├── mod.rs │ │ ├── server.rs │ │ ├── sprites.rs │ │ ├── styles.rs │ │ ├── tiles.rs │ │ └── tiles_info.rs │ ├── styles │ │ └── mod.rs │ └── utils │ │ ├── cache.rs │ │ ├── cfg_containers.rs │ │ ├── error.rs │ │ ├── id_resolver.rs │ │ ├── mod.rs │ │ ├── rectangle.rs │ │ ├── tests.rs │ │ └── utilities.rs └── tests │ ├── cors_test.rs │ ├── mb_server_test.rs │ ├── pg_function_source_test.rs │ ├── pg_server_test.rs │ ├── pg_table_source_test.rs │ ├── pmt_server_test.rs │ └── utils │ ├── mod.rs │ └── pg_utils.rs ├── mbtiles ├── .env ├── .sqlx │ ├── query-0a4540e8c33c71222a68ff5ecc1a167b406de9961ac3cc69649c6152a6d7a9b7.json │ ├── query-176e99c6945b0789119d0d21a99de564de47dde1d588f17e68ec58115ac73a39.json │ ├── query-208681caa7185b4014e7eda4120962954cdd3d913e8a786599da8a3f9799ed4b.json │ ├── query-386a375cf65c3e5aef51deffc99d23bd852ba445c1058aed380fe83bed618c29.json │ ├── query-41798c456136acb48ce59769a8abd1c6fb638f84d35457093b5dfbb3c8005433.json │ ├── query-428a035a55a07cbb9daac42c3ab05f2a7999788167f41c685af3ca6f5a1359f4.json │ ├── query-4d952966a8d8a030d2467c0701a6e16068c9897dd25d0ebd32929db9960596b4.json │ ├── query-55c64964bfddf842e4dd73726fe94f3d7d71f72439c8e8edc5c801f387de364b.json │ ├── query-5b298df51dccbf0d8a22433a99febc59c27dbf204d09a9c1fb0b3bf9aaad284b.json │ ├── query-60264fa07915878b3f7ba0067f48c3a379e96acbdf5fc52d14e29bc726fefab7.json │ ├── query-7341bfc10beb4719811556a57ae8098085994c8fba93e0293359afd43079c50c.json │ ├── query-73b5d12b379c0fb2d8560d99653729d96dd1288005f47872c6a79b5bbf1ca8de.json │ ├── query-748436831449877b242d6e167a2f8fe1b1e7b6fb87c4e04ad7406a2bbfd35bec.json │ ├── query-77b2f46851c4e991230ec6a5d33aaca18373bbdd548a8378ae7fbeed351b4b87.json │ ├── query-809e89c3b223e28c6716d405e13ba30fbf018805fe9ca2acd2b2e225183d1f13.json │ ├── query-85b46712c445679053e768cc98b22ea61633c21afb45d3d2b9aeec068d72cce0.json │ ├── query-96f3201d2151fbef63593c0e87648a2991e05060e71aa96141ece0867afa2d6c.json │ ├── query-c8ef3dc53f1f6fd80e266aab2bf007c66a1cc45bdfcdc38f93d6ba759125a9aa.json │ ├── query-d6ac76a234c97d0dc1fc4331d8b2cd90903d5401f8f0956245e5163bedd23a4d.json │ ├── query-f547ff198e3bb604550a3f191e4ad8c695c4c2350f294aefd210eccec603d905.json │ └── query-ffec5a4c88b2f5dbe9a2d1937286806bdd2b6a59a26ee0bbcc9a3d3f20efa39d.json ├── Cargo.toml ├── README.md ├── src │ ├── bin │ │ └── mbtiles.rs │ ├── bindiff.rs │ ├── copier.rs │ ├── errors.rs │ ├── lib.rs │ ├── mbtiles.rs │ ├── metadata.rs │ ├── patcher.rs │ ├── pool.rs │ ├── queries.rs │ ├── summary.rs │ ├── update.rs │ └── validation.rs └── tests │ ├── copy.rs │ ├── snapshots │ ├── copy__convert@v1__bbox__flat.snap │ ├── copy__convert@v1__bbox__hash.snap │ ├── copy__convert@v1__bbox__norm.snap │ ├── copy__convert@v1__meta__flat.snap │ ├── copy__convert@v1__meta__hash.snap │ ├── copy__convert@v1__meta__norm.snap │ ├── copy__convert@v1__tiles__flat.snap │ ├── copy__convert@v1__tiles__hash.snap │ ├── copy__convert@v1__tiles__norm.snap │ ├── copy__convert@v1__z6__flat.snap │ ├── copy__convert@v1__z6__hash.snap │ ├── copy__convert@v1__z6__norm.snap │ ├── copy__databases@flat__bdr.snap │ ├── copy__databases@flat__bdz.snap │ ├── copy__databases@flat__dif.snap │ ├── copy__databases@flat__dif_empty.snap │ ├── copy__databases@flat__empty-no-hash.snap │ ├── copy__databases@flat__empty.snap │ ├── copy__databases@flat__v1-no-hash.snap │ ├── copy__databases@flat__v1.snap │ ├── copy__databases@flat__v1z.snap │ ├── copy__databases@flat__v2.snap │ ├── copy__databases@flat__v2z.snap │ ├── copy__databases@hash__bdr.snap │ ├── copy__databases@hash__bdz.snap │ ├── copy__databases@hash__dif.snap │ ├── copy__databases@hash__dif_empty.snap │ ├── copy__databases@hash__empty-no-hash.snap │ ├── copy__databases@hash__empty.snap │ ├── copy__databases@hash__v1-no-hash.snap │ ├── copy__databases@hash__v1.snap │ ├── copy__databases@hash__v1z.snap │ ├── copy__databases@hash__v2.snap │ ├── copy__databases@hash__v2z.snap │ ├── copy__databases@norm__dif.snap │ ├── copy__databases@norm__dif_empty.snap │ ├── copy__databases@norm__empty-no-hash.snap │ ├── copy__databases@norm__empty.snap │ ├── copy__databases@norm__v1-no-hash.snap │ ├── copy__databases@norm__v1.snap │ ├── copy__databases@norm__v1z.snap │ ├── copy__databases@norm__v2.snap │ ├── copy__databases@norm__v2z.snap │ └── copy__update@update.snap │ ├── streams.rs │ └── validate.rs └── tests ├── composite_source.html ├── config.yaml ├── debug-deckgl.html ├── debug-leaflet.html ├── debug-maplibre.html ├── debug.html ├── expected ├── auto │ ├── catalog_auto.json │ ├── catalog_auto.json.headers │ ├── cmp.json │ ├── cmp.json.headers │ ├── cmp_0_0_0.pbf │ ├── cmp_0_0_0.pbf.geojson │ ├── cmp_0_0_0.pbf.headers │ ├── cmp_12_3673_1911.pbf │ ├── cmp_12_3673_1911.pbf.geojson │ ├── cmp_12_3673_1911.pbf.headers │ ├── cmp_13_7346_3822.pbf │ ├── cmp_13_7346_3822.pbf.geojson │ ├── cmp_13_7346_3822.pbf.headers │ ├── cmp_14_14692_7645.pbf │ ├── cmp_14_14692_7645.pbf.geojson │ ├── cmp_14_14692_7645.pbf.headers │ ├── cmp_17_117542_61161.pbf │ ├── cmp_17_117542_61161.pbf.geojson │ ├── cmp_17_117542_61161.pbf.headers │ ├── cmp_18_235085_122323.pbf │ ├── cmp_18_235085_122323.pbf.geojson │ ├── cmp_18_235085_122323.pbf.headers │ ├── cmp_6_57_29.pbf │ ├── cmp_6_57_29.pbf.geojson │ ├── cmp_6_57_29.pbf.headers │ ├── fnc.json │ ├── fnc.json.headers │ ├── fnc_0_0_0.pbf │ ├── fnc_0_0_0.pbf.geojson │ ├── fnc_0_0_0.pbf.headers │ ├── fnc_12_3673_1911.pbf │ ├── fnc_12_3673_1911.pbf.geojson │ ├── fnc_12_3673_1911.pbf.headers │ ├── fnc_13_7346_3822.pbf │ ├── fnc_13_7346_3822.pbf.geojson │ ├── fnc_13_7346_3822.pbf.headers │ ├── fnc_14_14692_7645.pbf │ ├── fnc_14_14692_7645.pbf.geojson │ ├── fnc_14_14692_7645.pbf.headers │ ├── fnc_17_117542_61161.pbf │ ├── fnc_17_117542_61161.pbf.geojson │ ├── fnc_17_117542_61161.pbf.headers │ ├── fnc_18_235085_122323.pbf │ ├── fnc_18_235085_122323.pbf.geojson │ ├── fnc_18_235085_122323.pbf.headers │ ├── fnc_6_57_29.pbf │ ├── fnc_6_57_29.pbf.geojson │ ├── fnc_6_57_29.pbf.headers │ ├── fnc_b.json │ ├── fnc_b.json.headers │ ├── fnc_b_6_38_20.pbf │ ├── fnc_b_6_38_20.pbf.geojson │ ├── fnc_b_6_38_20.pbf.headers │ ├── fnc_comment.json │ ├── fnc_comment.json.headers │ ├── fnc_token.json │ ├── fnc_token.json.headers │ ├── fnc_token_0_0_0.pbf │ ├── fnc_token_0_0_0.pbf.geojson │ ├── fnc_token_0_0_0.pbf.headers │ ├── fnc_zoom_xy_6_57_29.pbf │ ├── fnc_zoom_xy_6_57_29.pbf.geojson │ ├── fnc_zoom_xy_6_57_29.pbf.headers │ ├── fnc_zxy2_6_57_29.pbf │ ├── fnc_zxy2_6_57_29.pbf.geojson │ ├── fnc_zxy2_6_57_29.pbf.headers │ ├── fnc_zxy_6_57_29.pbf │ ├── fnc_zxy_6_57_29.pbf.geojson │ ├── fnc_zxy_6_57_29.pbf.headers │ ├── fnc_zxy_query_6_57_29.pbf │ ├── fnc_zxy_query_6_57_29.pbf.geojson │ ├── fnc_zxy_query_6_57_29.pbf.headers │ ├── fnc_zxy_row2_6_57_29.pbf │ ├── fnc_zxy_row2_6_57_29.pbf.geojson │ ├── fnc_zxy_row2_6_57_29.pbf.headers │ ├── fnc_zxy_row_6_57_29.pbf │ ├── fnc_zxy_row_6_57_29.pbf.geojson │ ├── fnc_zxy_row_6_57_29.pbf.headers │ ├── fnc_zxy_row_key_6_57_29.pbf │ ├── fnc_zxy_row_key_6_57_29.pbf.geojson │ ├── fnc_zxy_row_key_6_57_29.pbf.headers │ ├── mb_jpg.json │ ├── mb_jpg.json.headers │ ├── mb_jpg_0_0_0.jpg │ ├── mb_jpg_0_0_0.jpg.headers │ ├── mb_jpg_0_0_0.jpg.txt │ ├── mb_mvt.json │ ├── mb_mvt.json.headers │ ├── mb_mvt_2_3_1.pbf │ ├── mb_mvt_2_3_1.pbf.geojson │ ├── mb_mvt_2_3_1.pbf.headers │ ├── mb_png.json │ ├── mb_png.json.headers │ ├── mb_png_0_0_0.png │ ├── mb_png_0_0_0.png.headers │ ├── mb_png_0_0_0.png.txt │ ├── pmt.json │ ├── pmt.json.headers │ ├── pmt_3_4_2.png │ ├── pmt_3_4_2.png.headers │ ├── pmt_3_4_2.png.txt │ ├── points3857_srid.json │ ├── points3857_srid.json.headers │ ├── points3857_srid_0_0_0.pbf │ ├── points3857_srid_0_0_0.pbf.geojson │ ├── points3857_srid_0_0_0.pbf.headers │ ├── points_empty_srid_0_0_0.pbf │ ├── points_empty_srid_0_0_0.pbf.geojson │ ├── points_empty_srid_0_0_0.pbf.headers │ ├── rgb_u8.json │ ├── rgb_u8.json.headers │ ├── rgb_u8_0_0_0.png │ ├── rgb_u8_0_0_0.png.headers │ ├── rgb_u8_0_0_0.png.txt │ ├── rgb_u8_3_0_0.png │ ├── rgb_u8_3_0_0.png.headers │ ├── rgb_u8_3_0_0.png.txt │ ├── rgb_u8_3_1_1.png │ ├── rgb_u8_3_1_1.png.headers │ ├── rgb_u8_3_1_1.png.txt │ ├── rgba_u8.json │ ├── rgba_u8.json.headers │ ├── rgba_u8_0_0_0.png │ ├── rgba_u8_0_0_0.png.headers │ ├── rgba_u8_0_0_0.png.txt │ ├── rgba_u8_3_0_0.png │ ├── rgba_u8_3_0_0.png.headers │ ├── rgba_u8_3_0_0.png.txt │ ├── rgba_u8_3_1_1.png │ ├── rgba_u8_3_1_1.png.headers │ ├── rgba_u8_3_1_1.png.txt │ ├── rgba_u8_nodata.json │ ├── rgba_u8_nodata.json.headers │ ├── rgba_u8_nodata_0_0_0.png │ ├── rgba_u8_nodata_0_0_0.png.headers │ ├── rgba_u8_nodata_0_0_0.png.txt │ ├── rgba_u8_nodata_1_0_0.png │ ├── rgba_u8_nodata_1_0_0.png.headers │ ├── rgba_u8_nodata_1_0_0.png.txt │ ├── s3_1_0_0.pbf │ ├── s3_1_0_0.pbf.geojson │ ├── s3_1_0_0.pbf.headers │ ├── save_config.yaml │ ├── table_source.json │ ├── table_source.json.headers │ ├── tbl_0_0_0.pbf │ ├── tbl_0_0_0.pbf.geojson │ ├── tbl_0_0_0.pbf.headers │ ├── tbl_12_3673_1911.pbf │ ├── tbl_12_3673_1911.pbf.geojson │ ├── tbl_12_3673_1911.pbf.headers │ ├── tbl_13_7346_3822.pbf │ ├── tbl_13_7346_3822.pbf.geojson │ ├── tbl_13_7346_3822.pbf.headers │ ├── tbl_14_14692_7645.pbf │ ├── tbl_14_14692_7645.pbf.geojson │ ├── tbl_14_14692_7645.pbf.headers │ ├── tbl_17_117542_61161.pbf │ ├── tbl_17_117542_61161.pbf.geojson │ ├── tbl_17_117542_61161.pbf.headers │ ├── tbl_18_235085_122323.pbf │ ├── tbl_18_235085_122323.pbf.geojson │ ├── tbl_18_235085_122323.pbf.headers │ ├── tbl_6_57_29.pbf │ ├── tbl_6_57_29.pbf.geojson │ ├── tbl_6_57_29.pbf.headers │ ├── tbl_comment.json │ ├── tbl_comment.json.headers │ ├── webp2_1_0_0.png │ ├── webp2_1_0_0.png.headers │ └── webp2_1_0_0.png.txt ├── auto_mini │ ├── catalog_auto.json │ ├── catalog_auto.json.headers │ └── save_config.yaml ├── configured │ ├── catalog_cfg.json │ ├── catalog_cfg.json.headers │ ├── cmp.json │ ├── cmp.json.headers │ ├── cmp_0_0_0.pbf │ ├── cmp_0_0_0.pbf.geojson │ ├── cmp_0_0_0.pbf.headers │ ├── fnc2_0_0_0.pbf │ ├── fnc2_0_0_0.pbf.geojson │ ├── fnc2_0_0_0.pbf.headers │ ├── fnc_0_0_0.pbf │ ├── fnc_0_0_0.pbf.geojson │ ├── fnc_0_0_0.pbf.headers │ ├── fnc_comment_cfg.json │ ├── fnc_comment_cfg.json.headers │ ├── font_1.pbf │ ├── font_1.pbf.headers │ ├── font_2.pbf │ ├── font_2.pbf.headers │ ├── font_3.pbf │ ├── font_3.pbf.headers │ ├── pmt2_0_0_0.png │ ├── pmt2_0_0_0.png.headers │ ├── pmt2_0_0_0.png.txt │ ├── pmt_0_0_0.png │ ├── pmt_0_0_0.png.headers │ ├── pmt_0_0_0.png.txt │ ├── save_config.yaml │ ├── sdf_spr_cmp.json │ ├── sdf_spr_cmp.json.headers │ ├── sdf_spr_cmp.png │ ├── sdf_spr_cmp.png.headers │ ├── sdf_spr_cmp.png.txt │ ├── sdf_spr_cmp_2.json │ ├── sdf_spr_cmp_2.json.headers │ ├── sdf_spr_cmp_2.png │ ├── sdf_spr_cmp_2.png.headers │ ├── sdf_spr_cmp_2.png.txt │ ├── sdf_spr_mysrc.json │ ├── sdf_spr_mysrc.json.headers │ ├── sdf_spr_mysrc.png │ ├── sdf_spr_mysrc.png.headers │ ├── sdf_spr_mysrc.png.txt │ ├── sdf_spr_src1.json │ ├── sdf_spr_src1.json.headers │ ├── sdf_spr_src1.png │ ├── sdf_spr_src1.png.headers │ ├── sdf_spr_src1.png.txt │ ├── sdf_spr_src1_.json │ ├── sdf_spr_src1_.json.headers │ ├── sdf_spr_src1_.png │ ├── sdf_spr_src1_.png.headers │ ├── sdf_spr_src1_.png.txt │ ├── spr_cmp.json │ ├── spr_cmp.json.headers │ ├── spr_cmp.png │ ├── spr_cmp.png.headers │ ├── spr_cmp.png.txt │ ├── spr_cmp_2x.json │ ├── spr_cmp_2x.json.headers │ ├── spr_cmp_2x.png │ ├── spr_cmp_2x.png.headers │ ├── spr_cmp_2x.png.txt │ ├── spr_mysrc.json │ ├── spr_mysrc.json.headers │ ├── spr_mysrc.png │ ├── spr_mysrc.png.headers │ ├── spr_mysrc.png.txt │ ├── spr_mysrc_2x.json │ ├── spr_mysrc_2x.json.headers │ ├── spr_mysrc_2x.png │ ├── spr_mysrc_2x.png.headers │ ├── spr_mysrc_2x.png.txt │ ├── spr_src1.json │ ├── spr_src1.json.headers │ ├── spr_src1.png │ ├── spr_src1.png.headers │ ├── spr_src1.png.txt │ ├── spr_src1_2x.json │ ├── spr_src1_2x.json.headers │ ├── spr_src1_2x.png │ ├── spr_src1_2x.png.headers │ ├── spr_src1_2x.png.txt │ ├── style_maplibre_demo.1.json │ ├── style_maplibre_demo.1.json.headers │ ├── style_maplibre_demo.json │ ├── style_maplibre_demo.json.headers │ ├── style_src2_maptiler_basic.1.json │ ├── style_src2_maptiler_basic.1.json.headers │ ├── style_src2_maptiler_basic.json │ ├── style_src2_maptiler_basic.json.headers │ ├── tbl_0_0_0.pbf │ ├── tbl_0_0_0.pbf.geojson │ ├── tbl_0_0_0.pbf.headers │ ├── tbl_comment_cfg.json │ └── tbl_comment_cfg.json.headers ├── martin-cp │ ├── flat-with-hash_metadata.txt │ ├── flat-with-hash_save_config.yaml │ ├── flat-with-hash_summary.txt │ ├── flat-with-hash_validate.txt │ ├── flat_metadata.txt │ ├── flat_save_config.yaml │ ├── flat_summary.txt │ ├── flat_validate.txt │ ├── no-source_metadata.txt │ ├── no-source_save_config.yaml │ ├── no-source_summary.txt │ ├── no-source_validate.txt │ ├── normalized_metadata.txt │ ├── normalized_save_config.yaml │ ├── normalized_summary.txt │ └── normalized_validate.txt └── mbtiles │ ├── copy_apply.txt │ ├── copy_bindiff.txt │ ├── copy_bindiff2.txt │ ├── copy_bindiff3.txt │ ├── copy_bindiff4.txt │ ├── copy_bindiff5.txt │ ├── copy_bindiff6.txt │ ├── copy_bindiff7.txt │ ├── copy_bindiff_diff.txt │ ├── copy_diff.txt │ ├── copy_diff2.txt │ ├── meta-all.txt │ ├── meta-all_help.txt │ ├── meta-get_help.txt │ ├── meta-get_missing_value.txt │ ├── meta-get_name.txt │ ├── summary.txt │ ├── validate-bad-hash.txt │ ├── validate-bad-tiles.txt │ ├── validate-fix.txt │ ├── validate-fix2.txt │ └── validate-ok.txt ├── fixtures ├── cog │ ├── expected │ │ ├── all_transprent.png │ │ ├── down_padded.png │ │ ├── down_padded_with_alpha.png │ │ ├── not_padded.png │ │ ├── right_padded.png │ │ └── right_padded_with_alpha.png │ ├── rgb_u8.tif │ ├── rgba_u8.tif │ └── rgba_u8_nodata.tiff ├── files │ ├── bad_hash.mbtiles │ ├── invalid-tile-format.mbtiles │ ├── invalid-tile-idx.mbtiles │ ├── invalid.mbtiles │ ├── invalid_zoomed_world_cities.mbtiles │ └── tmp.json ├── fonts │ ├── overpass-mono-regular.ttf │ └── sub_dir │ │ └── overpass-mono-light.otf ├── functions │ ├── function_Mixed_Name.sql │ ├── function_null.sql │ ├── function_null_row.sql │ ├── function_null_row2.sql │ ├── function_special_characters.sql │ ├── function_zoom_xy.sql │ ├── function_zxy.sql │ ├── function_zxy2.sql │ ├── function_zxy_query.sql │ ├── function_zxy_query_jsonb.sql │ ├── function_zxy_query_test.sql │ ├── function_zxy_row.sql │ └── function_zxy_row_key.sql ├── initdb-dc-ssl-cert.sh ├── initdb-dc-ssl.sh ├── initdb-dc.sh ├── initdb.sh ├── mbtiles │ ├── geography-class-jpg-diff.mbtiles │ ├── geography-class-jpg-modified.mbtiles │ ├── geography-class-jpg.mbtiles │ ├── geography-class-png-no-bounds.mbtiles │ ├── geography-class-png.mbtiles │ ├── json.mbtiles │ ├── uncompressed_mvt.mbtiles │ ├── webp.mbtiles │ ├── world_cities.mbtiles │ ├── world_cities_bindiff.mbtiles │ ├── world_cities_diff.mbtiles │ ├── world_cities_modified.mbtiles │ └── zoomed_world_cities.mbtiles ├── pmtiles │ ├── png.pmtiles │ └── stamen_toner__raster_CC-BY+ODbL_z3.pmtiles ├── pmtiles2 │ └── webp2.pmtiles ├── sprites │ ├── expected │ │ ├── all_1.json │ │ ├── all_1.png │ │ ├── all_1_sdf.json │ │ ├── all_1_sdf.png │ │ ├── all_2.json │ │ ├── all_2.png │ │ ├── all_2_sdf.json │ │ ├── all_2_sdf.png │ │ ├── src1_1.json │ │ ├── src1_1.png │ │ ├── src1_1_sdf.json │ │ ├── src1_1_sdf.png │ │ ├── src1_2.json │ │ ├── src1_2.png │ │ ├── src1_2_sdf.json │ │ ├── src1_2_sdf.png │ │ ├── src2_1.json │ │ ├── src2_1.png │ │ ├── src2_1_sdf.json │ │ ├── src2_1_sdf.png │ │ ├── src2_2.json │ │ ├── src2_2.png │ │ ├── src2_2_sdf.json │ │ └── src2_2_sdf.png │ ├── src1 │ │ ├── another_bicycle.svg │ │ ├── bear.svg │ │ └── sub │ │ │ └── circle.svg │ └── src2 │ │ └── bicycle.svg ├── styles │ ├── maplibre_demo.json │ └── src2 │ │ ├── maptiler_basic.json │ │ └── osm-liberty-lite.json ├── tables │ ├── MixPoints.sql │ ├── SpacesAndQuotes.sql │ ├── autodetect.sql │ ├── points1.sql │ ├── points2.sql │ ├── points3857.sql │ ├── points_empty.sql │ ├── points_empty_srid.sql │ ├── table_source.sql │ ├── table_source_geog.sql │ └── table_source_multiple_geom.sql ├── vtzero-check └── vtzero-show ├── test-aws-lambda.sh └── test.sh /.dockerignore: -------------------------------------------------------------------------------- 1 | # Extras that are not part of .gitignore 2 | .git/ 3 | # Having Dockerfile in .dockerignore lets us develop docker images without full rebuild on each change 4 | Dockerfile 5 | # Justfile is not needed in the image 6 | justfile 7 | # Remove self from the image too 8 | .dockerignore 9 | # Unneeded code 10 | **/tests 11 | demo/ 12 | 13 | #### 14 | #### This must match .gitignore #### 15 | #### 16 | 17 | **/*.rs.bk 18 | **/dist/ 19 | **/node_modules/ 20 | *.profraw 21 | .DS_Store 22 | .aider* 23 | .aws-sam/ 24 | .idea/ 25 | .vscode/ 26 | config.yml 27 | pg_data/ 28 | target/ 29 | test_log* 30 | tests/mbtiles_temp_files/ 31 | tests/output/ 32 | tmp/ 33 | 34 | #### 35 | #### Above content must match .gitignore #### 36 | #### 37 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [ maplibre ] 2 | open_collective: maplibre 3 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | # Maintain dependencies for GitHub Actions 4 | - package-ecosystem: "github-actions" 5 | directory: "/" 6 | schedule: 7 | interval: "daily" 8 | groups: 9 | all-actions-version-updates: 10 | applies-to: version-updates 11 | patterns: 12 | - "*" 13 | all-actions-security-updates: 14 | applies-to: security-updates 15 | patterns: 16 | - "*" 17 | - package-ecosystem: cargo 18 | directory: "/" 19 | schedule: 20 | interval: daily 21 | time: "02:00" 22 | open-pull-requests-limit: 10 23 | groups: 24 | all-cargo-version-updates: 25 | applies-to: version-updates 26 | patterns: 27 | - "*" 28 | all-cargo-security-updates: 29 | applies-to: security-updates 30 | patterns: 31 | - "*" 32 | -------------------------------------------------------------------------------- /.github/files/config.markdownlint-cli2.jsonc: -------------------------------------------------------------------------------- 1 | { 2 | "config": { 3 | "default": true, 4 | "relative-links": true, 5 | "MD001": false, 6 | // Line length Check. See https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md013.md 7 | "MD013": false, 8 | "MD033": false, 9 | "MD041": false, 10 | "MD045": false, 11 | }, 12 | // globs expression. See https://github.com/DavidAnson/markdownlint-cli2#command-line 13 | "globs": [ 14 | "README.md", 15 | "!CHANGELOG.md", 16 | "docs/src/*.md" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /.github/files/lambda-function/Makefile: -------------------------------------------------------------------------------- 1 | build-MartinFunction: 2 | cp -a . $(ARTIFACTS_DIR) 3 | -------------------------------------------------------------------------------- /.github/files/lambda-function/config.yaml: -------------------------------------------------------------------------------- 1 | pmtiles: 2 | sources: 3 | webp2: ./webp2.pmtiles 4 | -------------------------------------------------------------------------------- /.github/files/lambda-layer/bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -eu 3 | exec martin -c "${_HANDLER}" 4 | -------------------------------------------------------------------------------- /.github/files/lambda.yaml: -------------------------------------------------------------------------------- 1 | # This is a minimal AWS SAM template sufficient to invoke the handler 2 | # in the CI environment. It probably hasn't been tested for actual 3 | # deployments. 4 | 5 | AWSTemplateFormatVersion: 2010-09-09 6 | Transform: 'AWS::Serverless-2016-10-31' 7 | Resources: 8 | MartinLayer: 9 | Type: 'AWS::Serverless::LayerVersion' 10 | Properties: 11 | ContentUri: lambda-layer/ 12 | MartinFunction: 13 | Type: 'AWS::Serverless::Function' 14 | Properties: 15 | Runtime: provided.al2023 16 | Layers: 17 | - Ref: MartinLayer 18 | CodeUri: lambda-function/ 19 | Handler: config.yaml 20 | -------------------------------------------------------------------------------- /.github/files/multi-platform.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.21 2 | 3 | ARG TARGETPLATFORM 4 | 5 | LABEL org.opencontainers.image.description="Blazing fast and lightweight tile server with PostGIS, MBTiles, and PMTiles support" 6 | LABEL org.opencontainers.image.source="https://github.com/maplibre/martin" 7 | LABEL org.opencontainers.image.licenses="Apache-2.0 OR MIT" 8 | LABEL org.opencontainers.image.documentation="https://maplibre.org/martin/" 9 | LABEL org.opencontainers.image.vendor="maplibre" 10 | LABEL org.opencontainers.image.authors="Yuri Astrakhan, Stepan Kuzmin and MapLibre contributors" 11 | 12 | COPY target_releases/$TARGETPLATFORM/* /usr/local/bin 13 | 14 | HEALTHCHECK CMD wget --spider http://127.0.0.1:3000/health || exit 1 15 | ENTRYPOINT ["/usr/local/bin/martin"] 16 | -------------------------------------------------------------------------------- /.github/workflows/audit-check.yml: -------------------------------------------------------------------------------- 1 | name: Security audit 2 | 3 | on: 4 | schedule: 5 | - cron: "0 0 * * *" 6 | 7 | jobs: 8 | audit: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v4 12 | - uses: actions-rs/audit-check@v1 13 | with: 14 | token: ${{ secrets.GITHUB_TOKEN }} 15 | -------------------------------------------------------------------------------- /.github/workflows/bench.yml: -------------------------------------------------------------------------------- 1 | name: Benchmark 2 | 3 | on: 4 | # push: 5 | # branches: [ main ] 6 | # paths-ignore: 7 | # - '**.md' 8 | # - 'demo/**' 9 | # - 'docs/**' 10 | # pull_request: 11 | # types: [ opened, synchronize, reopened ] 12 | # paths-ignore: 13 | # - '**.md' 14 | # - 'demo/**' 15 | # - 'docs/**' 16 | workflow_dispatch: 17 | 18 | jobs: 19 | check_benchmark: 20 | runs-on: ubuntu-latest 21 | 22 | steps: 23 | - name: Checkout sources 24 | uses: actions/checkout@v4 25 | 26 | - name: Check benchmark 27 | run: cargo bench 28 | -------------------------------------------------------------------------------- /.github/workflows/demo.yml: -------------------------------------------------------------------------------- 1 | name: Demo 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | paths: 9 | - 'demo/**' 10 | release: 11 | types: [ published ] 12 | workflow_dispatch: 13 | 14 | jobs: 15 | demo: 16 | name: Demo 17 | runs-on: ubuntu-latest 18 | 19 | steps: 20 | - name: Checkout sources 21 | uses: actions/checkout@v4 22 | - uses: taiki-e/install-action@v2 23 | with: { tool: just } 24 | - run: cd demo && just build 25 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Packaging and release 2 | 3 | # For now this is only testing that packaging will be possible in the future 4 | 5 | on: 6 | push: 7 | branches: [ main ] 8 | paths-ignore: 9 | - '**.md' 10 | - 'demo/**' 11 | - 'docs/**' 12 | pull_request: 13 | branches: [ main ] 14 | paths-ignore: 15 | - '**.md' 16 | - 'demo/**' 17 | - 'docs/**' 18 | workflow_dispatch: 19 | 20 | jobs: 21 | release: 22 | runs-on: ubuntu-latest 23 | steps: 24 | - name: Checkout sources 25 | uses: actions/checkout@v4 26 | - uses: Swatinem/rust-cache@v2 27 | - name: Install nightly toolchain 28 | uses: dtolnay/rust-toolchain@master 29 | with: 30 | toolchain: nightly 31 | - name: Test packaging 32 | run: cargo publish --workspace -Z package-workspace --dry-run 33 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #### 2 | #### This must match .dockerignore #### 3 | #### 4 | 5 | **/*.rs.bk 6 | **/dist/ 7 | **/node_modules/ 8 | *.profraw 9 | .DS_Store 10 | .aider* 11 | .aws-sam/ 12 | .idea/ 13 | .vscode/ 14 | config.yml 15 | pg_data/ 16 | target/ 17 | test_log* 18 | tests/mbtiles_temp_files/ 19 | tests/output/ 20 | tmp/ 21 | 22 | #### 23 | #### Above content must match .dockerignore #### 24 | #### 25 | -------------------------------------------------------------------------------- /CITATION.cff: -------------------------------------------------------------------------------- 1 | 2 | # Parser settings. 3 | cff-version: 1.2.0 4 | message: Please cite this crate using these information. 5 | 6 | # Version information. 7 | date-released: 2024-11-29 8 | version: 4.5.21 9 | 10 | # Project information. 11 | abstract: Vector Tiles from Large Databases on the Fly 12 | authors: 13 | - alias: nyurik 14 | family-names: Astrakhan 15 | given-names: Yuri 16 | - name: The maplibre Community 17 | license: 18 | - MIT 19 | - Apache-2.0 20 | repository-artifact: https://martin.maplibre.org 21 | repository-code: https://github.com/maplibre/martin 22 | title: Martin 23 | url: https://martin.maplibre.org 24 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of conduct 2 | 3 | [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/maplibre/maplibre/blob/main/CODE_OF_CONDUCT.md) 4 | -------------------------------------------------------------------------------- /Cross.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | pre-build = [ 3 | # install nodejs and npm to compile static web resources 4 | # note that architecture could be the same as the container, not $CROSS_DEB_ARCH 5 | # Need to use a fairly old Node.js version to support the old underlying docker image 6 | "curl -fsSL https://deb.nodesource.com/setup_17.x -o nodesource_setup.sh", 7 | "bash nodesource_setup.sh", 8 | "apt-get install -y nodejs", 9 | "node -v", 10 | # Using old NPM, so must ensure correct access 11 | "mkdir -p /.npm", 12 | "chown -R 1001:127 /.npm", 13 | ] 14 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | For an up-to-date policy refer to 4 | 5 | -------------------------------------------------------------------------------- /clippy.toml: -------------------------------------------------------------------------------- 1 | allow-unwrap-in-tests = true 2 | avoid-breaking-exported-api = false 3 | -------------------------------------------------------------------------------- /debian/martin.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description = A blazing fast map tile server which can generate and serve vector tiles on the fly from large PostGIS databases, PMTile, and MBTile files 3 | 4 | [Service] 5 | ExecStart = /usr/bin/martin --config /usr/local/etc/martin/config.yaml 6 | 7 | [Install] 8 | WantedBy = multi-user.target 9 | -------------------------------------------------------------------------------- /demo/.dockerignore: -------------------------------------------------------------------------------- 1 | #### This must match .dockerignore #### 2 | 3 | # dependencies 4 | frontend/node_modules 5 | 6 | # testing 7 | frontend/coverage 8 | 9 | # production 10 | frontend/build 11 | frontend/dist 12 | 13 | db/initdb/taxi_zones 14 | db/initdb/taxi_trips 15 | 16 | # misc 17 | .DS_Store 18 | .env.local 19 | .env.development.local 20 | .env.test.local 21 | .env.production.local 22 | 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | .idea 28 | data 29 | db/db 30 | -------------------------------------------------------------------------------- /demo/.gitignore: -------------------------------------------------------------------------------- 1 | #### This must match .dockerignore #### 2 | 3 | # dependencies 4 | frontend/node_modules 5 | 6 | # testing 7 | frontend/coverage 8 | 9 | # production 10 | frontend/build 11 | frontend/dist 12 | 13 | db/initdb/taxi_zones 14 | db/initdb/taxi_trips 15 | 16 | # misc 17 | .DS_Store 18 | .env.local 19 | .env.development.local 20 | .env.test.local 21 | .env.production.local 22 | 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | .idea 28 | data 29 | db/db 30 | -------------------------------------------------------------------------------- /demo/README.md: -------------------------------------------------------------------------------- 1 | # Martin Use Case 2 | 3 | ## Usage in Docker-Compose 4 | 5 | ```shell 6 | just up 7 | ``` 8 | 9 | * Open http://localhost in your browser 10 | -------------------------------------------------------------------------------- /demo/db/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM postgis/postgis:15-3.3 2 | 3 | RUN set -x \ 4 | && apt-get update \ 5 | && apt-get install -y --no-install-recommends \ 6 | wget \ 7 | ca-certificates \ 8 | unzip \ 9 | dos2unix \ 10 | gdal-bin \ 11 | && rm -rf /var/lib/apt/lists/* 12 | -------------------------------------------------------------------------------- /demo/db/csv-data-actual-headers: -------------------------------------------------------------------------------- 1 | VendorID, 2 | tpep_pickup_datetime, 3 | tpep_dropoff_datetime, 4 | passenger_count, 5 | trip_distance, 6 | RatecodeID, 7 | store_and_fwd_flag, 8 | PULocationID, 9 | DOLocationID, 10 | payment_type, 11 | fare_amount, 12 | extra, 13 | mta_tax, 14 | tip_amount, 15 | tolls_amount, 16 | improvement_surcharge, 17 | total_amount, 18 | congestion_surcharge, 19 | airport_fee 20 | -------------------------------------------------------------------------------- /demo/db/initdb/03.sql: -------------------------------------------------------------------------------- 1 | drop table if exists trips_by_hour; 2 | create table trips_by_hour as 3 | select 4 | pulocationid, 5 | round( 6 | avg(extract(epoch from (dropoff_datetime - pickup_datetime)) / 60) 7 | )::INTEGER as trips_duration, 8 | count(*) as trips_count, 9 | round(avg(total_amount)) as trips_price, 10 | date_trunc('hour', pickup_datetime) as pickup_datetime 11 | from trips 12 | group by pulocationid, date_trunc('hour', pickup_datetime); 13 | -------------------------------------------------------------------------------- /demo/frontend/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:alpine as builder 2 | 3 | WORKDIR /usr/src/app 4 | 5 | COPY package.json . 6 | COPY yarn.lock . 7 | RUN yarn install 8 | 9 | COPY . . 10 | RUN yarn run build 11 | 12 | FROM nginx:alpine 13 | COPY nginx.conf /etc/nginx/nginx.conf 14 | COPY --from=builder /usr/src/app/dist /usr/share/nginx/html 15 | -------------------------------------------------------------------------------- /demo/frontend/dev.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:alpine as builder 2 | 3 | WORKDIR /usr/src/app 4 | 5 | COPY package.json . 6 | COPY yarn.lock . 7 | RUN yarn install 8 | 9 | COPY . . 10 | RUN yarn run build 11 | 12 | CMD ["yarn", "run", "preview"] 13 | -------------------------------------------------------------------------------- /demo/frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/demo/frontend/public/favicon.ico -------------------------------------------------------------------------------- /demo/frontend/public/martin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/demo/frontend/public/martin.png -------------------------------------------------------------------------------- /demo/frontend/src/Components/App/fonts/vremenagroteskbold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/demo/frontend/src/Components/App/fonts/vremenagroteskbold.woff -------------------------------------------------------------------------------- /demo/frontend/src/Components/App/fonts/vremenagroteskbold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/demo/frontend/src/Components/App/fonts/vremenagroteskbold.woff2 -------------------------------------------------------------------------------- /demo/frontend/src/Components/App/fonts/vremenagroteskbook.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/demo/frontend/src/Components/App/fonts/vremenagroteskbook.woff -------------------------------------------------------------------------------- /demo/frontend/src/Components/App/fonts/vremenagroteskbook.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/demo/frontend/src/Components/App/fonts/vremenagroteskbook.woff2 -------------------------------------------------------------------------------- /demo/frontend/src/Components/App/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './App'; 2 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Description.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.div` 4 | display: flex; 5 | align-items: center; 6 | justify-content: center; 7 | 8 | max-width: 980px; 9 | height: 50vh; 10 | padding: 7vw; 11 | margin:auto; 12 | 13 | font-size: 50px; 14 | line-height: 1.55; 15 | 16 | @media (max-width: 500px) { 17 | height: 30vh; 18 | margin-bottom: 150px; 19 | 20 | font-size: 30px; 21 | } 22 | `; 23 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Development/Container.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.div` 4 | max-width: 1024px; 5 | padding: 7vw 0; 6 | margin: auto; 7 | 8 | font-size: 30px; 9 | 10 | @media (max-width: 500px) { 11 | padding: 7vw 7vw 50px; 12 | } 13 | `; 14 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Development/Development.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import Container from './Container'; 4 | import Title from './Title'; 5 | import GitHubButton from '../GitHubButton'; 6 | import DocsButton from '../GitHubButton/DocsButton'; 7 | 8 | const Development = () => ( 9 | 10 | Start building with Martin! 11 | {' '} 12 | 13 | 14 | ); 15 | 16 | export default Development; 17 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Development/Title.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.div` 4 | margin-bottom: 50px; 5 | 6 | @media (max-width: 500px) { 7 | display: none; 8 | } 9 | `; 10 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Development/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Development'; 2 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Fatures/Container.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.div` 4 | display: flex; 5 | flex-direction: column; 6 | align-items: center; 7 | 8 | padding: 7vw; 9 | 10 | overflow: hidden; 11 | `; 12 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Fatures/Description.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.div` 4 | position: relative; 5 | margin-left: 150px; 6 | 7 | font-size: 40px; 8 | 9 | @media (max-width: 500px) { 10 | margin-left: 20vw; 11 | 12 | font-size: 30px; 13 | } 14 | `; 15 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Fatures/Title.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.div` 4 | position: relative; 5 | max-width: 400px; 6 | margin-bottom: 80px; 7 | 8 | font-size: 50px; 9 | font-weight: bold; 10 | color: transparent; 11 | line-height: 1.3; 12 | -webkit-text-stroke-width: 1px; 13 | -webkit-text-stroke-color: white; 14 | text-transform: uppercase; 15 | 16 | @media (max-width: 500px) { 17 | font-size: 35px; 18 | } 19 | 20 | img { 21 | max-width: 100%; 22 | } 23 | `; 24 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Fatures/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Features'; 2 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Fatures/martin_mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/demo/frontend/src/Components/Fatures/martin_mobile.png -------------------------------------------------------------------------------- /demo/frontend/src/Components/Footer/Container.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.footer` 4 | display: flex; 5 | align-items: center; 6 | justify-content: center; 7 | 8 | padding: 23px; 9 | 10 | font-size: 16px; 11 | 12 | background-color: #171727; 13 | 14 | a img:last-child { 15 | transition: .4s; 16 | } 17 | 18 | // a:hover img:last-child { 19 | // transform: translateX(10px); 20 | 21 | // transition: .4s; 22 | // } 23 | `; 24 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Footer/Description.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.div` 4 | margin-right: 6px; 5 | color: #9fa3b2; 6 | `; 7 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Footer/Footer.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import maplibre from './maplibre-logo-big.svg'; 4 | 5 | import Container from './Container'; 6 | // import Description from './Description'; 7 | 8 | const Footer = () => ( 9 | 10 | 11 | MapLibre 12 | 13 | 14 | ); 15 | 16 | export default Footer; 17 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Footer/index.js: -------------------------------------------------------------------------------- 1 | export { default } from './Footer'; 2 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Footer/urbica.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/GitHubButton/Container.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.a` 4 | display: inline-flex; 5 | align-content: center; 6 | 7 | padding: 10px; 8 | border: solid 1px #fff; 9 | font-size: 20px; 10 | color: #fff; 11 | text-decoration: none; 12 | 13 | background-color: transparent; 14 | 15 | cursor: pointer; 16 | 17 | &:hover{ 18 | border-color: transparent; 19 | 20 | box-shadow: 3px 3px 0 rgba(115, 0, 255, 1); 21 | } 22 | 23 | img { 24 | margin-left: 10px; 25 | } 26 | `; 27 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/GitHubButton/DocsButton.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import octocat from './octocat.svg'; 3 | import Container from './Container'; 4 | 5 | const DocsButton = () => ( 6 | 7 | Documentation 8 | 9 | ); 10 | 11 | export default DocsButton; 12 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/GitHubButton/GitHubButton.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import octocat from './octocat.svg'; 3 | import Container from './Container'; 4 | 5 | const GitHubButton = () => ( 6 | 7 | View on GitHub 8 | octocat 9 | 10 | ); 11 | 12 | export default GitHubButton; 13 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/GitHubButton/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './GitHubButton'; 2 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/GitHubButton/octocat.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Intro/Container.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | import logoMartin from './logo_martin.svg'; 4 | 5 | export default styled.div` 6 | display: flex; 7 | justify-content: flex-end; 8 | align-items: center; 9 | 10 | height: 110vh; 11 | padding: 7vw; 12 | 13 | color: #fff; 14 | 15 | background: url(${logoMartin}) no-repeat; 16 | background-size: contain; 17 | 18 | @media (max-width: 500px) { 19 | justify-content: center; 20 | } 21 | `; 22 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Intro/Description.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.div` 4 | max-width: 500px; 5 | margin-bottom: 70px; 6 | 7 | font-size: 30px; 8 | line-height: 1.45; 9 | 10 | @media (max-width: 500px) { 11 | font-size: 20px; 12 | } 13 | `; 14 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Intro/Intro.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Parallax } from 'react-scroll-parallax' 3 | 4 | import Container from './Container' 5 | import Title from './Title' 6 | import Description from './Description' 7 | import GitHubButton from '../GitHubButton' 8 | import DocsButton from '../GitHubButton/DocsButton' 9 | 10 | const Intro = () => ( 11 | 12 | 13 | Martin<br />Demo 14 | Vector Tiles from Large Databases on the Fly 15 | {' '} 16 | 17 | 18 | 19 | ) 20 | 21 | export default Intro 22 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Intro/Title.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.h1` 4 | margin: 0 0 20px; 5 | 6 | font-size: 80px; 7 | letter-spacing: 15px; 8 | color: transparent; 9 | -webkit-text-stroke-width: 2px; 10 | -webkit-text-stroke-color: white; 11 | text-transform: uppercase; 12 | 13 | @media (max-width: 500px) { 14 | font-size: 50px; 15 | letter-spacing: initial; 16 | -webkit-text-stroke-width: 1px; 17 | } 18 | `; 19 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Intro/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Intro'; 2 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Map/Container.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.div` 4 | position: relative; 5 | 6 | margin-bottom: 50px; 7 | 8 | @media (max-width: 500px) { 9 | display: none; 10 | } 11 | `; 12 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Map/Filters/AvgTime.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.div<{ isEnabled: boolean }>` 4 | padding: 5px; 5 | border-radius: 5px; 6 | 7 | font-size: 16px; 8 | font-weight: bold; 9 | 10 | color: ${({ isEnabled }) => (isEnabled ? '#DADFEE' : '#6C7495')}; 11 | cursor: pointer; 12 | 13 | &:hover { 14 | background-color: #161626; 15 | } 16 | `; 17 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Map/Filters/CaptionElement/CaptionElement.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const CaptionElement = ({ date, localeUtils, locale }) => { 4 | const months = localeUtils.getMonths(locale); 5 | 6 | return ( 7 |
8 | {months[date.getMonth()]} 9 |
10 | ); 11 | }; 12 | 13 | export default CaptionElement; 14 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Map/Filters/CaptionElement/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './CaptionElement'; 2 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Map/Filters/Container.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.div` 4 | position: absolute; 5 | top: 0; 6 | 7 | width: 350px; 8 | padding: 20px; 9 | border-bottom-right-radius: 5px; 10 | background-color: rgba(42, 42, 68, 0.9); 11 | color: #dadfee; 12 | 13 | z-index: 3; 14 | height: 615px; 15 | 16 | 17 | @media (max-width: 500px) { 18 | position: initial; 19 | 20 | width: 100%; 21 | } 22 | `; 23 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Map/Filters/DayPicker.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.div` 4 | border-radius: 5px; 5 | margin-bottom: 10px; 6 | 7 | background-color: #161626; 8 | 9 | .DayPicker-wrapper { 10 | outline: none; 11 | } 12 | 13 | .DayPicker-Caption > div { 14 | font-weight: bold; 15 | color: #dadfee; 16 | } 17 | 18 | .DayPicker-NavButton--prev { 19 | margin-right: 0.7em; 20 | } 21 | 22 | .DayPicker-NavButton { 23 | width: 0.7em; 24 | height: 0.7em; 25 | } 26 | 27 | .DayPicker-Weekday { 28 | color: #6C7495; 29 | } 30 | 31 | .DayPicker-Day--selected:not(.DayPicker-Day--outside) { 32 | background-color: #2c0ea6 !important; 33 | } 34 | 35 | .DayPicker-Day:not( 36 | .DayPicker-Day--disabled):not( 37 | .DayPicker-Day--selected):not( 38 | .DayPicker-Day--outside):hover { 39 | color: #000; 40 | } 41 | 42 | .DayPicker-Day { 43 | border-radius: 0 !important; 44 | outline: none; 45 | } 46 | `; 47 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Map/Filters/Layers/Description.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.div` 4 | margin-top: 15px; 5 | 6 | font-size: 14px; 7 | color: rgba(218,223,238,0.9); 8 | `; 9 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Map/Filters/Layers/Layer.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.div<{ isLayerVisible: boolean }>` 4 | padding: 5px; 5 | border-radius: 5px; 6 | margin-bottom: 15px; 7 | 8 | color: ${({ isLayerVisible }) => (isLayerVisible ? '#DADFEE' : '#6C7495')}; 9 | cursor: pointer; 10 | 11 | &:hover { 12 | background-color: #161626; 13 | } 14 | `; 15 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Map/Filters/Layers/Legend.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.div<{ fromColor: string; toColor: string }>` 4 | height: 4px; 5 | border-radius: 5px; 6 | margin-top: 6px; 7 | 8 | background: 9 | linear-gradient(to right, 10 | ${({ fromColor, toColor }) => `${fromColor}, ${toColor}`}); 11 | `; 12 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Map/Filters/Layers/Title.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.div` 4 | text-transform: uppercase; 5 | font-size: 16px; 6 | font-weight: bold; 7 | `; 8 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Map/Filters/Layers/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Layers'; 2 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Map/Filters/Range.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.div` 4 | padding: 5px; 5 | margin-bottom: 10px; 6 | border-radius: 5px; 7 | 8 | font-size: 16px; 9 | font-weight: bold; 10 | 11 | color: #DADFEE; 12 | 13 | &:hover { 14 | background-color: #161626; 15 | } 16 | `; 17 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Map/Filters/Separator.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.div` 4 | height: 6px; 5 | border-top: solid 1px rgba(87,94,119,0.9); 6 | border-bottom: solid 1px rgba(87,94,119,0.9); 7 | margin-bottom: 20px; 8 | `; 9 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Map/Filters/TimePicker.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.div` 4 | display: flex; 5 | align-items: center; 6 | 7 | input { 8 | margin: 0 20px; 9 | } 10 | `; 11 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Map/Filters/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Filters'; 2 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/Map/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Map'; 2 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/MobileMap.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.img` 4 | display: none; 5 | width: 100%; 6 | 7 | margin-top: -120px; 8 | margin-bottom: 50px; 9 | 10 | @media (max-width: 500px) { 11 | display: block; 12 | } 13 | `; 14 | -------------------------------------------------------------------------------- /demo/frontend/src/Components/TryIt.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export default styled.div` 4 | max-width: 1024px; 5 | padding: 7vw 0; 6 | margin: auto auto 125px; 7 | 8 | font-size: 40px; 9 | 10 | @media (max-width: 500px) { 11 | display: none; 12 | } 13 | `; 14 | -------------------------------------------------------------------------------- /demo/frontend/src/config/constants.ts: -------------------------------------------------------------------------------- 1 | export const MAP_STYLE = 'https://basemaps.cartocdn.com/gl/positron-gl-style/style.json'; 2 | export const JAN = new Date(2017, 0); 3 | export const DEC = new Date(2017, 11); 4 | -------------------------------------------------------------------------------- /demo/frontend/src/config/features.ts: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | id: 1, 4 | title: 'Turning Data into Vector Tiles', 5 | description: 'Martin creates MVT vector tiles from any PostGIS table or view' 6 | }, 7 | { 8 | id: 2, 9 | title: 'Generating Tiles with Functions', 10 | description: 'Martin is the only vector tile server capable of creating tiles using database functions directly' 11 | }, 12 | { 13 | id: 3, 14 | title: 'Filtering and Aggregating Data on the Fly', 15 | description: 'Martin is ideal for large datasets as it allows passing parameters from a URL into a user function to filter features and aggregate attribute values' 16 | } 17 | ]; 18 | -------------------------------------------------------------------------------- /demo/frontend/src/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { createRoot } from 'react-dom/client'; 3 | import App from './Components/App'; 4 | 5 | const container = document.getElementById('root')!; 6 | const root = createRoot(container); 7 | root.render(); 8 | -------------------------------------------------------------------------------- /demo/frontend/src/utils/dateConverter.ts: -------------------------------------------------------------------------------- 1 | export default (date) => { 2 | if (!date) return ''; 3 | 4 | return `${date.getMonth() + 1}.${date.getDate()}`; 5 | }; 6 | -------------------------------------------------------------------------------- /demo/frontend/src/utils/getColorsFromLayer.ts: -------------------------------------------------------------------------------- 1 | export default (layer, painProperty) => { 2 | const fromColor = layer.paint[painProperty][4]; 3 | const lastItemIndex = layer.paint[painProperty].length - 1; 4 | const toColor = layer.paint[painProperty][lastItemIndex]; 5 | 6 | return [fromColor, toColor]; 7 | }; 8 | -------------------------------------------------------------------------------- /demo/frontend/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "target": "ESNext", 5 | "module": "ESNext", 6 | "moduleResolution": "node", 7 | "noImplicitAny": false, 8 | 9 | "allowSyntheticDefaultImports": true, 10 | "esModuleInterop": true, 11 | "allowJs": true, 12 | "jsx": "react-jsx", 13 | "jsxImportSource": "react", 14 | "types": ["vite/client"], 15 | "noEmit": true, 16 | "strictNullChecks": false, 17 | "isolatedModules": true 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /demo/frontend/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | import mkcert from 'vite-plugin-mkcert' 4 | import viteTsConfigPaths from 'vite-tsconfig-paths' 5 | 6 | export default defineConfig({ 7 | plugins: [ 8 | react(), 9 | viteTsConfigPaths({ 10 | root: './', 11 | }), 12 | mkcert(), 13 | ], 14 | build: { 15 | target: 'esnext', 16 | }, 17 | server: { https: false, host: true, port: 8080 }, 18 | }) 19 | -------------------------------------------------------------------------------- /demo/justfile: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env just --justfile 2 | 3 | set shell := ['bash', '-c'] 4 | 5 | dockercompose := `if docker-compose --version &> /dev/null; then echo "docker-compose"; else echo "docker compose"; fi` 6 | 7 | @_default: 8 | just --list 9 | 10 | build: 11 | {{dockercompose}} build 12 | 13 | clean: 14 | rm -rf frontend/node_modules 15 | 16 | frontend *ARGS: 17 | {{dockercompose}} up frontend {{ARGS}} 18 | 19 | [no-exit-message] 20 | frontend-sh: 21 | {{dockercompose}} run --interactive --entrypoint sh frontend 22 | 23 | up: 24 | {{dockercompose}} up 25 | 26 | up-backend: 27 | {{dockercompose}} up db tiles --detach 28 | 29 | up-build: 30 | {{dockercompose}} up --build 31 | -------------------------------------------------------------------------------- /docs/book.toml: -------------------------------------------------------------------------------- 1 | [book] 2 | authors = ["MapLibre contributors"] 3 | language = "en" 4 | multilingual = false 5 | src = "src" 6 | title = "Martin Tile Server Documentation" 7 | 8 | [build] 9 | build-dir = "../target/book" 10 | 11 | [output.html] 12 | curly-quotes = true 13 | git-repository-url = "https://github.com/maplibre/martin" 14 | edit-url-template = "https://github.com/maplibre/martin/edit/main/docs/{path}" 15 | -------------------------------------------------------------------------------- /docs/src/images/maputnik-add-layer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/docs/src/images/maputnik-add-layer.png -------------------------------------------------------------------------------- /docs/src/images/maputnik-add-tilejson.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/docs/src/images/maputnik-add-tilejson.png -------------------------------------------------------------------------------- /docs/src/images/maputnik-add-yachts-layer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/docs/src/images/maputnik-add-yachts-layer.png -------------------------------------------------------------------------------- /docs/src/images/maputnik-change-datasource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/docs/src/images/maputnik-change-datasource.png -------------------------------------------------------------------------------- /docs/src/images/maputnik-configure-layer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/docs/src/images/maputnik-configure-layer.png -------------------------------------------------------------------------------- /docs/src/images/maputnik-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/docs/src/images/maputnik-open.png -------------------------------------------------------------------------------- /docs/src/images/maputnik-select-style.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/docs/src/images/maputnik-select-style.png -------------------------------------------------------------------------------- /docs/src/images/maputnik-zoom-into-monaco.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/docs/src/images/maputnik-zoom-into-monaco.png -------------------------------------------------------------------------------- /docs/src/images/qgis_add_to_layers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/docs/src/images/qgis_add_to_layers.png -------------------------------------------------------------------------------- /docs/src/images/qgis_add_vector_tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/docs/src/images/qgis_add_vector_tile.png -------------------------------------------------------------------------------- /docs/src/images/qgis_add_vector_tile_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/docs/src/images/qgis_add_vector_tile_options.png -------------------------------------------------------------------------------- /docs/src/images/qgis_shows_in_the_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/docs/src/images/qgis_shows_in_the_map.png -------------------------------------------------------------------------------- /docs/src/images/sources-sprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/docs/src/images/sources-sprites.png -------------------------------------------------------------------------------- /docs/src/martin-as-a-library.md: -------------------------------------------------------------------------------- 1 | # Martin as a library 2 | 3 | Martin can be used as a standalone server, or as a library in your own Rust application. When used as a library, you can use the following features: 4 | 5 | * `webui` - enable web UI 6 | * tile sources 7 | * `mbtiles` - enable MBTile tile sources 8 | * `pmtiles` - enable PMTile tile sources 9 | * `postgres` - enable PostgreSQL/PostGIS tile sources 10 | * supporting resources 11 | * `fonts` - enable font sources 12 | * `sprites` - enable sprite sources 13 | * `styles` - enable style sources 14 | * `lambda` - add specialised support for running in serverless functions 15 | 16 | If you are missing a part of Martin functionality in the [public `martin` API](https://docs.rs/martin), we would love to hear from you. 17 | Please open an issue on our GitHub repository or directly open a pull request. 18 | -------------------------------------------------------------------------------- /docs/src/mbtiles.md: -------------------------------------------------------------------------------- 1 | # Working with MBTiles archives 2 | 3 | Martin includes `mbtiles` utility to interact with the [`*.mbtiles` files](mbtiles-schema.md) from the command line. 4 | It allows users to [examine](mbtiles-meta.md), [copy](mbtiles-copy.md), [validate](mbtiles-validation.md) or [compare and apply diffs between them](mbtiles-diff.md). 5 | 6 | Use `mbtiles --help` to see a list of available commands, and `mbtiles --help` to see help for a specific command. 7 | 8 | This tool can be installed by compiling the latest released version with `cargo install mbtiles --locked`, or by downloading a pre-built binary from the [releases page](https://github.com/maplibre/martin/releases/latest). 9 | -------------------------------------------------------------------------------- /docs/src/quick-start-linux.md: -------------------------------------------------------------------------------- 1 | ## Quick start on Linux 2 | 3 | ```bash 4 | mkdir martin 5 | cd martin 6 | 7 | # Download some sample data 8 | curl -L -O https://github.com/maplibre/martin/raw/main/tests/fixtures/mbtiles/world_cities.mbtiles 9 | 10 | # Download the latest version of Martin binary, extract it, and make it executable 11 | curl -L -O https://github.com/maplibre/martin/releases/latest/download/martin-x86_64-unknown-linux-gnu.tar.gz 12 | tar -xzf martin-x86_64-unknown-linux-gnu.tar.gz 13 | chmod +x ./martin 14 | 15 | # Show Martin help screen 16 | ./martin --help 17 | 18 | # Run Martin with the sample data as the only tile source 19 | ./martin world_cities.mbtiles 20 | ``` 21 | 22 | ### View the map 23 | 24 | See [quick start with QGIS](quick-start-qgis.md) for instructions on how to view the map. 25 | -------------------------------------------------------------------------------- /docs/src/quick-start-qgis.md: -------------------------------------------------------------------------------- 1 | ### View map with QGIS 2 | 3 | 1. Download, install, and run [QGIS](https://qgis.org/en/site/forusers/download.html) for your platform 4 | 5 | 2. Add a new `Vector Tiles` connection 6 | > ![alt text](images/qgis_add_vector_tile.png) 7 | 8 | 3. In the `Vector Tile Connection` dialog, give it some name and the URL of the Martin server, 9 | e.g. `http://localhost:3000/world_cities/{z}/{x}/{y}` and click `OK`. 10 | > ![alt text](images/qgis_add_vector_tile_options.png) 11 | 12 | 4. In the QGIS browser panel (left), double-click the newly added connection, or right-click it and click 13 | on `Add Layer to Project`. 14 | > ![alt text](images/qgis_add_to_layers.png) 15 | 16 | 5. The map should now be visible in the QGIS map view. 17 | > ![alt text](images/qgis_shows_in_the_map.png) 18 | -------------------------------------------------------------------------------- /docs/src/quick-start-windows.md: -------------------------------------------------------------------------------- 1 | ## Quick start on Windows 2 | 3 | 1. Download some [demo tiles](https://github.com/maplibre/martin/raw/main/tests/fixtures/mbtiles/world_cities.mbtiles). 4 | 5 | 2. Download the latest Windows version of Martin from 6 | the [release page](https://github.com/maplibre/martin/releases): [martin-x86_64-pc-windows-msvc.zip](https://github.com/maplibre/martin/releases/latest/download/martin-x86_64-pc-windows-msvc.zip) 7 | 8 | 3. Extract content of both files and place them in a same directory. 9 | 10 | 4. Open the command prompt and navigate to the directory where `martin` and `world_cities.mbtiles` are located. 11 | 12 | 5. Run the following command to start Martin with the demo data: 13 | 14 | ```bash 15 | # Show Martin help screen 16 | martin --help 17 | 18 | # Run Martin with the sample data as the only tile source 19 | martin world_cities.mbtiles 20 | ``` 21 | 22 | ### View the map 23 | 24 | See [quick start with QGIS](quick-start-qgis.md) for instructions on how to view the map. 25 | -------------------------------------------------------------------------------- /docs/src/quick-start.md: -------------------------------------------------------------------------------- 1 | ## Martin Quick Start Guide 2 | 3 | Choose your operating system to get started with Martin tile server 4 | 5 | * [Linux](quick-start-linux.md) 6 | * [macOS](quick-start-macos.md) 7 | * [Windows](quick-start-windows.md) 8 | -------------------------------------------------------------------------------- /docs/src/run-hosting-environment.md: -------------------------------------------------------------------------------- 1 | # Hosting Environment–specific Guides 2 | 3 | To help with common runtimes, we have written the following guides: 4 | 5 | - [Docker](run-with-docker.md) 6 | - [Docker-compose](run-with-docker-compose.md) 7 | - [AWS Lambda](run-with-lambda.md) 8 | -------------------------------------------------------------------------------- /docs/src/run-with-reverse-proxy.md: -------------------------------------------------------------------------------- 1 | # Reverse Proxies 2 | 3 | Martin can run without a reverse proxy. 4 | 5 | Doing so has a few downsides: 6 | 7 | - Martin does not support HTTPS connections (TLS termination). 8 | - We do not check `HOST`-headers - we just serve on a port. 9 | This means anybody can point their dns record to your server and serve to all requests going to the port Martin is running on. 10 | Using a reverse proxy makes this abuse obvious. 11 | - Martin only supports a simple in-memory caching. 12 | If you need more advanced caching options, you can use a reverse proxy like [Nginx](https://nginx.org/), [Varnish](https://varnish-cache.org/), or [Apache](https://httpd.apache.org/) with custom rules. 13 | For example, you may choose to only cache zoom 0..10. 14 | - You may need to host more than just tiles at a single domain name. 15 | - Martin has a fixed public API, but your site may require a different structure, e.g. serving tiles with from a sub-path like `/tiles/source/z/x/y`. 16 | -------------------------------------------------------------------------------- /docs/src/run.md: -------------------------------------------------------------------------------- 1 | # Usage 2 | 3 | Martin requires at least one PostgreSQL [connection string](pg-connections.md) or a [tile source file](sources-files.md) 4 | as a command-line argument. A PG connection string can also be passed via the `DATABASE_URL` environment variable. 5 | 6 | ```bash 7 | martin postgresql://postgres@localhost/db 8 | ``` 9 | 10 | Martin provides [TileJSON](https://github.com/mapbox/tilejson-spec) endpoint for 11 | each [geospatial-enabled](https://postgis.net/docs/using_postgis_dbmanagement.html#geometry_columns) table in your 12 | database. 13 | -------------------------------------------------------------------------------- /docs/src/sources-composite.md: -------------------------------------------------------------------------------- 1 | ## Composite Sources 2 | 3 | Composite Sources allows combining multiple sources into one. Composite Source consists of multiple sources separated by 4 | comma `{source1},...,{sourceN}` 5 | 6 | Each source in a composite source can be accessed with its `{source_name}` as a `source-layer` property. 7 | 8 | Composite source [TileJSON](https://github.com/mapbox/tilejson-spec) endpoint is available 9 | at `/{source1},...,{sourceN}`, and tiles are available at `/{source1},...,{sourceN}/{z}/{x}/{y}`. 10 | 11 | For example, composite source combining `points` and `lines` sources will be available at `/points,lines/{z}/{x}/{y}` 12 | 13 | ```bash 14 | # TileJSON 15 | curl localhost:3000/points,lines 16 | 17 | # Whole world as a single tile 18 | curl localhost:3000/points,lines/0/0/0 19 | ``` 20 | -------------------------------------------------------------------------------- /docs/src/sources-resources.md: -------------------------------------------------------------------------------- 1 | # Supporting Resources 2 | 3 | Data alone is not enough to show an interactive map. 4 | A map requires data, but it also requires fonts, sprites (sometimes called glyphs) and (dependent on the rendering engine) a style. 5 | -------------------------------------------------------------------------------- /docs/src/sources-styles.md: -------------------------------------------------------------------------------- 1 | ## Style Sources 2 | 3 | Martin will serve your styles as needed by MapLibre rendering libraries. 4 | 5 | To edit these styles, we recommend using . 6 | 7 | ### API 8 | 9 | Martin can serve [MapLibre Style Spec](https://maplibre.org/maplibre-style-spec/). 10 | Currently, Martin will use any valid [`JSON`](https://json.org) file as a style, 11 | but in the future, we may optimise Martin which may result in additional restrictions. 12 | 13 | Use the `/catalog` API to see all the ``s. 14 | 15 | ### Map Style 16 | 17 | Use the `/style/` API to get a ``'s JSON content. 18 | 19 | Changes or removals of styles are reflected immediately, but additions are not. 20 | A restart of Martin is required to see new styles. 21 | 22 | ### Server-side raster tile rendering 23 | 24 | This is not implemented yet, but there is a plan to add it. 25 | Please see for more information. 26 | -------------------------------------------------------------------------------- /docs/src/troubleshooting.md: -------------------------------------------------------------------------------- 1 | ## Troubleshooting 2 | 3 | Log levels are controlled on a per-module basis, and by default all logging is disabled except for errors. Logging is 4 | controlled via the `RUST_LOG` environment variable. The value of this environment variable is a comma-separated list of 5 | logging directives. 6 | 7 | This will enable debug logging for all modules: 8 | 9 | ```bash 10 | export RUST_LOG=debug 11 | martin postgresql://postgres@localhost/db 12 | ``` 13 | 14 | While this will only enable verbose logging for the `actix_web` module and enable debug logging for the `martin` 15 | and `tokio_postgres` modules: 16 | 17 | ```bash 18 | export RUST_LOG=actix_web=info,martin=debug,tokio_postgres=debug 19 | martin postgresql://postgres@localhost/db 20 | ``` 21 | -------------------------------------------------------------------------------- /docs/src/using-guides.md: -------------------------------------------------------------------------------- 1 | # Guides 2 | 3 | This section of the docs' site is dedicated to some examples and tutorials. 4 | If you have something you would like to share with the community that is not straightforward and might be beneficial to others, this is the place! 5 | 6 | The process of adding examples or guides is pretty straightforward, see our `docs` folder in the [Martin repository](https://github.com/maplibre/martin) for more information. 7 | -------------------------------------------------------------------------------- /docs/src/using-with-data.md: -------------------------------------------------------------------------------- 1 | # Tile source specific 2 | 3 | Some sources for tiles are harder to setup than others. 4 | Below, we provide setup instructions for some common data sources: 5 | 6 | - [Hosted PostgreSQL](recipes.md) 7 | - [Setting up a basemap and overlaying data](recipe-basemap-postgis.md) 8 | -------------------------------------------------------------------------------- /docs/src/using-with-leaflet.md: -------------------------------------------------------------------------------- 1 | ## Using with Leaflet 2 | 3 | [Leaflet](https://github.com/Leaflet/Leaflet) is the leading open-source JavaScript library for mobile-friendly interactive maps. 4 | 5 | You can add vector tiles using [Leaflet.VectorGrid](https://github.com/Leaflet/Leaflet.VectorGrid) plugin. You must initialize a [VectorGrid.Protobuf](https://leaflet.github.io/Leaflet.VectorGrid/vectorgrid-api-docs.html#vectorgrid-protobuf) with a URL template, just like in L.TileLayers. The difference is that you should define the styling for all the features. 6 | 7 | ```js 8 | L.vectorGrid 9 | .protobuf('http://localhost:3000/points/{z}/{x}/{y}', { 10 | vectorTileLayerStyles: { 11 | 'points': { 12 | color: 'red', 13 | fill: true 14 | } 15 | } 16 | }) 17 | .addTo(map); 18 | ``` 19 | -------------------------------------------------------------------------------- /docs/src/using-with-openlayers.md: -------------------------------------------------------------------------------- 1 | ## Using with OpenLayers 2 | 3 | [OpenLayers](https://github.com/openlayers/openlayers) is an open source library for creating interactive maps on the web. Similar to [MapLibre GL JS](https://maplibre.org/), it can also display image and vector map tiles served by Martin Tile Server. 4 | 5 | You can integrate tile services from `martin` and `OpenLayers` with its [VectorTileLayer](https://openlayers.org/en/latest/apidoc/module-ol_layer_VectorTile-VectorTileLayer.html). Here is an example to add `MixPoints` vector tile source to an OpenLayers map. 6 | 7 | ```js 8 | const layer = new VectorTileLayer({ 9 | source: new VectorTileSource({ 10 | format: new MVT(), 11 | url: 'http://0.0.0.0:3000/MixPoints/{z}/{x}/{y}', 12 | maxZoom: 14, 13 | }), 14 | }); 15 | map.addLayer(layer); 16 | ``` 17 | -------------------------------------------------------------------------------- /docs/src/using-with-renderer.md: -------------------------------------------------------------------------------- 1 | # Map renderer specific 2 | 3 | Martin is mostly a general purpose tileserver. 4 | The exception is style serving, as it is specific to [maplibre](https://maplibre.org). 5 | -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/logo.png -------------------------------------------------------------------------------- /martin-tile-utils/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "martin-tile-utils" 3 | version = "0.6.1" 4 | authors = ["Yuri Astrakhan ", "MapLibre contributors"] 5 | description = "Utilities to help with map tile processing, such as type and compression detection. Used by the MapLibre's Martin tile server." 6 | keywords = ["maps", "tiles", "mvt", "tileserver"] 7 | categories = ["science::geo", "parsing"] 8 | exclude = [ 9 | # Exclude the fixtures directory from the package - it's only used for tests. 10 | "/fixtures", 11 | ] 12 | edition.workspace = true 13 | license.workspace = true 14 | repository.workspace = true 15 | rust-version.workspace = true 16 | homepage.workspace = true 17 | 18 | [dependencies] 19 | brotli.workspace = true 20 | flate2.workspace = true 21 | 22 | [dev-dependencies] 23 | approx.workspace = true 24 | rstest.workspace = true 25 | 26 | [lints] 27 | workspace = true 28 | -------------------------------------------------------------------------------- /martin-tile-utils/fixtures/dc.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/martin-tile-utils/fixtures/dc.webp -------------------------------------------------------------------------------- /martin-tile-utils/fixtures/world.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/martin-tile-utils/fixtures/world.jpg -------------------------------------------------------------------------------- /martin-tile-utils/fixtures/world.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/martin-tile-utils/fixtures/world.png -------------------------------------------------------------------------------- /martin/README.md: -------------------------------------------------------------------------------- 1 | ../README.md -------------------------------------------------------------------------------- /martin/martin-ui/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { browser: true, es2020: true }, 4 | extends: [ 5 | 'eslint:recommended', 6 | 'plugin:@typescript-eslint/recommended', 7 | 'plugin:react-hooks/recommended', 8 | ], 9 | ignorePatterns: ['dist', '.eslintrc.cjs'], 10 | parser: '@typescript-eslint/parser', 11 | plugins: ['react-refresh'], 12 | rules: { 13 | 'react-refresh/only-export-components': [ 14 | 'warn', 15 | { allowConstantExport: true }, 16 | ], 17 | }, 18 | } 19 | -------------------------------------------------------------------------------- /martin/martin-ui/README.md: -------------------------------------------------------------------------------- 1 | # Martin Web UI 2 | 3 | A web interface for previewing tiles served by Martin. 4 | 5 | ### Run locally 6 | 7 | To run just the web interface 8 | 9 | ```bash 10 | npm i 11 | npm run dev 12 | ``` 13 | -------------------------------------------------------------------------------- /martin/martin-ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "martin-ui", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "react": "^19.1.0", 14 | "react-dom": "^19.1.0", 15 | "styled-components": "^6.1.18" 16 | }, 17 | "devDependencies": { 18 | "@types/react": "^19.1.6", 19 | "@types/react-dom": "^19.1.5", 20 | "@typescript-eslint/eslint-plugin": "^8.33.0", 21 | "@typescript-eslint/parser": "^8.33.0", 22 | "@vitejs/plugin-react": "^4.5.0", 23 | "eslint": "^8.57.1", 24 | "eslint-plugin-react-hooks": "^5.2.0", 25 | "eslint-plugin-react-refresh": "^0.4.20", 26 | "typescript": "^5.8.3", 27 | "vite": "^5.4.19" 28 | }, 29 | "engines": { 30 | "node": ">=18.20.3", 31 | "npm": ">=10.7.0" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /martin/martin-ui/public/_/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/martin/martin-ui/public/_/assets/favicon.ico -------------------------------------------------------------------------------- /martin/martin-ui/src/App.css: -------------------------------------------------------------------------------- 1 | #root {} 2 | -------------------------------------------------------------------------------- /martin/martin-ui/src/App.tsx: -------------------------------------------------------------------------------- 1 | import martinCover from './assets/logo.png'; 2 | import './App.css'; 3 | import styled from 'styled-components'; 4 | 5 | const CoverImage = styled.img` 6 | width: 100%; 7 | height: 100%; 8 | `; 9 | 10 | function App() { 11 | return ( 12 |
13 | 14 |
15 | ); 16 | } 17 | 18 | export default App; 19 | -------------------------------------------------------------------------------- /martin/martin-ui/src/assets/logo.png: -------------------------------------------------------------------------------- 1 | ../../../../logo.png -------------------------------------------------------------------------------- /martin/martin-ui/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | :root { 6 | font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; 7 | line-height: 1.5; 8 | font-weight: 400; 9 | color-scheme: dark light; 10 | } 11 | -------------------------------------------------------------------------------- /martin/martin-ui/src/main.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import App from './App.tsx' 4 | import './index.css' 5 | 6 | ReactDOM.createRoot(document.getElementById('root')!).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /martin/martin-ui/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /martin/martin-ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | "jsx": "react-jsx", 16 | 17 | /* Linting */ 18 | "strict": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "noFallthroughCasesInSwitch": true 22 | }, 23 | "include": ["src"], 24 | "references": [{ "path": "./tsconfig.node.json" }] 25 | } 26 | -------------------------------------------------------------------------------- /martin/martin-ui/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /martin/martin-ui/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import react from '@vitejs/plugin-react'; 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | build: { 8 | // assets can also be the name of a tile source 9 | // so we use /_/assets to avoid conflicts 10 | assetsDir: '_/assets' 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /martin/release.toml: -------------------------------------------------------------------------------- 1 | pre-release-replacements = [ 2 | { file = "CHANGELOG.md", search = "Unreleased", replace = "{{version}}" }, 3 | { file = "CHANGELOG.md", search = "\\.\\.\\.HEAD", replace = "...{{tag_name}}", exactly = 1 }, 4 | { file = "CHANGELOG.md", search = "ReleaseDate", replace = "{{date}}" }, 5 | { file = "CHANGELOG.md", search = "", replace = "\n\n## [Unreleased] - ReleaseDate", exactly = 1 }, 6 | { file = "CHANGELOG.md", search = "", replace = "\n[Unreleased]: https://github.com/assert-rs/predicates-rs/compare/{{tag_name}}...HEAD", exactly = 1 }, 7 | ] 8 | -------------------------------------------------------------------------------- /martin/src/args/mod.rs: -------------------------------------------------------------------------------- 1 | mod connections; 2 | pub use connections::{Arguments, State}; 3 | 4 | mod environment; 5 | pub use environment::{Env, OsEnv}; 6 | 7 | #[cfg(feature = "postgres")] 8 | mod pg; 9 | #[cfg(feature = "postgres")] 10 | pub use pg::{BoundsCalcType, DEFAULT_BOUNDS_TIMEOUT, PgArgs}; 11 | 12 | mod root; 13 | pub use root::{Args, ExtraArgs, MetaArgs}; 14 | 15 | mod srv; 16 | #[cfg(feature = "webui")] 17 | pub use srv::WebUiMode; 18 | pub use srv::{PreferredEncoding, SrvArgs}; 19 | -------------------------------------------------------------------------------- /martin/src/cog/mod.rs: -------------------------------------------------------------------------------- 1 | mod config; 2 | mod errors; 3 | mod model; 4 | mod source; 5 | 6 | pub use config::CogConfig; 7 | pub use errors::CogError; 8 | -------------------------------------------------------------------------------- /martin/src/pg/mod.rs: -------------------------------------------------------------------------------- 1 | mod builder; 2 | mod config; 3 | mod config_function; 4 | mod config_table; 5 | mod errors; 6 | mod pg_source; 7 | mod pool; 8 | mod query_functions; 9 | mod query_tables; 10 | mod tls; 11 | mod utils; 12 | 13 | pub use config::{PgCfgPublish, PgCfgPublishFuncs, PgCfgPublishTables, PgConfig, PgSslCerts}; 14 | pub use config_function::FunctionInfo; 15 | pub use config_table::TableInfo; 16 | pub use errors::{PgError, PgResult}; 17 | pub use pool::{POOL_SIZE_DEFAULT, PgPool}; 18 | pub use query_functions::query_available_function; 19 | -------------------------------------------------------------------------------- /martin/src/srv/mod.rs: -------------------------------------------------------------------------------- 1 | mod config; 2 | pub use config::{KEEP_ALIVE_DEFAULT, LISTEN_ADDRESSES_DEFAULT, SrvConfig}; 3 | 4 | #[cfg(feature = "fonts")] 5 | mod fonts; 6 | 7 | mod server; 8 | pub use server::{Catalog, RESERVED_KEYWORDS, new_server, router}; 9 | 10 | pub mod cors; 11 | 12 | mod tiles; 13 | pub use tiles::{DynTileSource, TileRequest}; 14 | 15 | mod tiles_info; 16 | pub use tiles_info::{SourceIDsRequest, merge_tilejson}; 17 | 18 | #[cfg(feature = "sprites")] 19 | mod sprites; 20 | 21 | #[cfg(feature = "styles")] 22 | mod styles; 23 | -------------------------------------------------------------------------------- /martin/src/utils/mod.rs: -------------------------------------------------------------------------------- 1 | pub(crate) mod cache; 2 | pub use cache::{CacheKey, CacheValue, MainCache, NO_MAIN_CACHE, OptMainCache}; 3 | 4 | mod cfg_containers; 5 | pub use cfg_containers::{OptBoolObj, OptOneMany}; 6 | 7 | mod error; 8 | pub use error::*; 9 | 10 | mod id_resolver; 11 | pub use id_resolver::IdResolver; 12 | 13 | mod rectangle; 14 | pub use rectangle::{TileRect, append_rect}; 15 | 16 | mod utilities; 17 | pub use utilities::*; 18 | -------------------------------------------------------------------------------- /mbtiles/.env: -------------------------------------------------------------------------------- 1 | # DATABASE_URL=sqlite:mbtiles/data/geography-class-jpg.mbtiles 2 | SQLX_OFFLINE=true 3 | -------------------------------------------------------------------------------- /mbtiles/.sqlx/query-0a4540e8c33c71222a68ff5ecc1a167b406de9961ac3cc69649c6152a6d7a9b7.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "VACUUM", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 0 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "0a4540e8c33c71222a68ff5ecc1a167b406de9961ac3cc69649c6152a6d7a9b7" 12 | } 13 | -------------------------------------------------------------------------------- /mbtiles/.sqlx/query-176e99c6945b0789119d0d21a99de564de47dde1d588f17e68ec58115ac73a39.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT 1 as has_rows FROM sqlite_schema LIMIT 1", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "has_rows", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 0 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "176e99c6945b0789119d0d21a99de564de47dde1d588f17e68ec58115ac73a39" 20 | } 21 | -------------------------------------------------------------------------------- /mbtiles/.sqlx/query-208681caa7185b4014e7eda4120962954cdd3d913e8a786599da8a3f9799ed4b.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "PRAGMA page_size;", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "page_size", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 0 14 | }, 15 | "nullable": [ 16 | null 17 | ] 18 | }, 19 | "hash": "208681caa7185b4014e7eda4120962954cdd3d913e8a786599da8a3f9799ed4b" 20 | } 21 | -------------------------------------------------------------------------------- /mbtiles/.sqlx/query-386a375cf65c3e5aef51deffc99d23bd852ba445c1058aed380fe83bed618c29.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT value from metadata where name = ?", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "value", 8 | "ordinal": 0, 9 | "type_info": "Text" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | true 17 | ] 18 | }, 19 | "hash": "386a375cf65c3e5aef51deffc99d23bd852ba445c1058aed380fe83bed618c29" 20 | } 21 | -------------------------------------------------------------------------------- /mbtiles/.sqlx/query-428a035a55a07cbb9daac42c3ab05f2a7999788167f41c685af3ca6f5a1359f4.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "PRAGMA encoding = 'UTF-8'", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 0 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "428a035a55a07cbb9daac42c3ab05f2a7999788167f41c685af3ca6f5a1359f4" 12 | } 13 | -------------------------------------------------------------------------------- /mbtiles/.sqlx/query-4d952966a8d8a030d2467c0701a6e16068c9897dd25d0ebd32929db9960596b4.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "DELETE FROM metadata WHERE name=?", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 1 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "4d952966a8d8a030d2467c0701a6e16068c9897dd25d0ebd32929db9960596b4" 12 | } 13 | -------------------------------------------------------------------------------- /mbtiles/.sqlx/query-55c64964bfddf842e4dd73726fe94f3d7d71f72439c8e8edc5c801f387de364b.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT zoom_level, tile_column, tile_row FROM tiles", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "zoom_level", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | }, 11 | { 12 | "name": "tile_column", 13 | "ordinal": 1, 14 | "type_info": "Integer" 15 | }, 16 | { 17 | "name": "tile_row", 18 | "ordinal": 2, 19 | "type_info": "Integer" 20 | } 21 | ], 22 | "parameters": { 23 | "Right": 0 24 | }, 25 | "nullable": [ 26 | true, 27 | true, 28 | true 29 | ] 30 | }, 31 | "hash": "55c64964bfddf842e4dd73726fe94f3d7d71f72439c8e8edc5c801f387de364b" 32 | } 33 | -------------------------------------------------------------------------------- /mbtiles/.sqlx/query-5b298df51dccbf0d8a22433a99febc59c27dbf204d09a9c1fb0b3bf9aaad284b.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT tile_column, tile_row, tile_data FROM tiles WHERE zoom_level = ? LIMIT 1", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "tile_column", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | }, 11 | { 12 | "name": "tile_row", 13 | "ordinal": 1, 14 | "type_info": "Integer" 15 | }, 16 | { 17 | "name": "tile_data", 18 | "ordinal": 2, 19 | "type_info": "Blob" 20 | } 21 | ], 22 | "parameters": { 23 | "Right": 1 24 | }, 25 | "nullable": [ 26 | true, 27 | true, 28 | true 29 | ] 30 | }, 31 | "hash": "5b298df51dccbf0d8a22433a99febc59c27dbf204d09a9c1fb0b3bf9aaad284b" 32 | } 33 | -------------------------------------------------------------------------------- /mbtiles/.sqlx/query-60264fa07915878b3f7ba0067f48c3a379e96acbdf5fc52d14e29bc726fefab7.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT tile_data from tiles where zoom_level = ? AND tile_column = ? AND tile_row = ?", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "tile_data", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 3 14 | }, 15 | "nullable": [ 16 | true 17 | ] 18 | }, 19 | "hash": "60264fa07915878b3f7ba0067f48c3a379e96acbdf5fc52d14e29bc726fefab7" 20 | } 21 | -------------------------------------------------------------------------------- /mbtiles/.sqlx/query-73b5d12b379c0fb2d8560d99653729d96dd1288005f47872c6a79b5bbf1ca8de.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "PRAGMA page_count;", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "page_count", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 0 14 | }, 15 | "nullable": [ 16 | null 17 | ] 18 | }, 19 | "hash": "73b5d12b379c0fb2d8560d99653729d96dd1288005f47872c6a79b5bbf1ca8de" 20 | } 21 | -------------------------------------------------------------------------------- /mbtiles/.sqlx/query-748436831449877b242d6e167a2f8fe1b1e7b6fb87c4e04ad7406a2bbfd35bec.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles WHERE zoom_level >= 0 LIMIT 1", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "zoom_level", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | }, 11 | { 12 | "name": "tile_column", 13 | "ordinal": 1, 14 | "type_info": "Integer" 15 | }, 16 | { 17 | "name": "tile_row", 18 | "ordinal": 2, 19 | "type_info": "Integer" 20 | }, 21 | { 22 | "name": "tile_data", 23 | "ordinal": 3, 24 | "type_info": "Blob" 25 | } 26 | ], 27 | "parameters": { 28 | "Right": 0 29 | }, 30 | "nullable": [ 31 | true, 32 | true, 33 | true, 34 | true 35 | ] 36 | }, 37 | "hash": "748436831449877b242d6e167a2f8fe1b1e7b6fb87c4e04ad7406a2bbfd35bec" 38 | } 39 | -------------------------------------------------------------------------------- /mbtiles/.sqlx/query-77b2f46851c4e991230ec6a5d33aaca18373bbdd548a8378ae7fbeed351b4b87.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT (\n -- Has a 'tiles_with_hash' table\n SELECT COUNT(*) = 1\n FROM sqlite_master\n WHERE name = 'tiles_with_hash'\n AND type = 'table'\n --\n ) as is_valid;", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "is_valid", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 0 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "77b2f46851c4e991230ec6a5d33aaca18373bbdd548a8378ae7fbeed351b4b87" 20 | } 21 | -------------------------------------------------------------------------------- /mbtiles/.sqlx/query-96f3201d2151fbef63593c0e87648a2991e05060e71aa96141ece0867afa2d6c.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\nSELECT min(zoom_level) AS min_zoom,\n max(zoom_level) AS max_zoom\nFROM tiles;", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "min_zoom", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | }, 11 | { 12 | "name": "max_zoom", 13 | "ordinal": 1, 14 | "type_info": "Integer" 15 | } 16 | ], 17 | "parameters": { 18 | "Right": 0 19 | }, 20 | "nullable": [ 21 | true, 22 | true 23 | ] 24 | }, 25 | "hash": "96f3201d2151fbef63593c0e87648a2991e05060e71aa96141ece0867afa2d6c" 26 | } 27 | -------------------------------------------------------------------------------- /mbtiles/.sqlx/query-c8ef3dc53f1f6fd80e266aab2bf007c66a1cc45bdfcdc38f93d6ba759125a9aa.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "INSERT OR REPLACE INTO metadata(name, value) VALUES(?, ?)", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 2 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "c8ef3dc53f1f6fd80e266aab2bf007c66a1cc45bdfcdc38f93d6ba759125a9aa" 12 | } 13 | -------------------------------------------------------------------------------- /mbtiles/.sqlx/query-d6ac76a234c97d0dc1fc4331d8b2cd90903d5401f8f0956245e5163bedd23a4d.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT name, value FROM metadata WHERE value IS NOT ''", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "name", 8 | "ordinal": 0, 9 | "type_info": "Text" 10 | }, 11 | { 12 | "name": "value", 13 | "ordinal": 1, 14 | "type_info": "Text" 15 | } 16 | ], 17 | "parameters": { 18 | "Right": 0 19 | }, 20 | "nullable": [ 21 | true, 22 | true 23 | ] 24 | }, 25 | "hash": "d6ac76a234c97d0dc1fc4331d8b2cd90903d5401f8f0956245e5163bedd23a4d" 26 | } 27 | -------------------------------------------------------------------------------- /mbtiles/.sqlx/query-f547ff198e3bb604550a3f191e4ad8c695c4c2350f294aefd210eccec603d905.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "PRAGMA page_size = 512", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 0 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "f547ff198e3bb604550a3f191e4ad8c695c4c2350f294aefd210eccec603d905" 12 | } 13 | -------------------------------------------------------------------------------- /mbtiles/.sqlx/query-ffec5a4c88b2f5dbe9a2d1937286806bdd2b6a59a26ee0bbcc9a3d3f20efa39d.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "zoom_level", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | }, 11 | { 12 | "name": "tile_column", 13 | "ordinal": 1, 14 | "type_info": "Integer" 15 | }, 16 | { 17 | "name": "tile_row", 18 | "ordinal": 2, 19 | "type_info": "Integer" 20 | }, 21 | { 22 | "name": "tile_data", 23 | "ordinal": 3, 24 | "type_info": "Blob" 25 | } 26 | ], 27 | "parameters": { 28 | "Right": 0 29 | }, 30 | "nullable": [ 31 | true, 32 | true, 33 | true, 34 | true 35 | ] 36 | }, 37 | "hash": "ffec5a4c88b2f5dbe9a2d1937286806bdd2b6a59a26ee0bbcc9a3d3f20efa39d" 38 | } 39 | -------------------------------------------------------------------------------- /mbtiles/tests/snapshots/copy__convert@v1__meta__flat.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: mbtiles/tests/copy.rs 3 | expression: actual_value 4 | --- 5 | [[]] 6 | type = 'table' 7 | tbl_name = 'metadata' 8 | sql = ''' 9 | CREATE TABLE metadata ( 10 | name text NOT NULL PRIMARY KEY, 11 | value text)''' 12 | values = [ 13 | '( "agg_tiles_hash", "9ED9178D7025276336C783C2B54D6258" )', 14 | '( "md-edit", "value - v1" )', 15 | '( "md-remove", "value - remove" )', 16 | '( "md-same", "value - same" )', 17 | ] 18 | 19 | [[]] 20 | type = 'table' 21 | tbl_name = 'tiles' 22 | sql = ''' 23 | CREATE TABLE tiles ( 24 | zoom_level integer NOT NULL, 25 | tile_column integer NOT NULL, 26 | tile_row integer NOT NULL, 27 | tile_data blob, 28 | PRIMARY KEY(zoom_level, tile_column, tile_row))''' 29 | values = [] 30 | 31 | [[]] 32 | type = 'index' 33 | tbl_name = 'metadata' 34 | 35 | [[]] 36 | type = 'index' 37 | tbl_name = 'tiles' 38 | -------------------------------------------------------------------------------- /mbtiles/tests/snapshots/copy__databases@flat__empty-no-hash.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: mbtiles/tests/copy.rs 3 | expression: actual_value 4 | --- 5 | [[]] 6 | type = 'table' 7 | tbl_name = 'metadata' 8 | sql = ''' 9 | CREATE TABLE metadata ( 10 | name text NOT NULL PRIMARY KEY, 11 | value text)''' 12 | values = [] 13 | 14 | [[]] 15 | type = 'table' 16 | tbl_name = 'tiles' 17 | sql = ''' 18 | CREATE TABLE tiles ( 19 | zoom_level integer NOT NULL, 20 | tile_column integer NOT NULL, 21 | tile_row integer NOT NULL, 22 | tile_data blob, 23 | PRIMARY KEY(zoom_level, tile_column, tile_row))''' 24 | values = [] 25 | 26 | [[]] 27 | type = 'index' 28 | tbl_name = 'metadata' 29 | 30 | [[]] 31 | type = 'index' 32 | tbl_name = 'tiles' 33 | -------------------------------------------------------------------------------- /mbtiles/tests/snapshots/copy__databases@flat__empty.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: mbtiles/tests/copy.rs 3 | expression: actual_value 4 | --- 5 | [[]] 6 | type = 'table' 7 | tbl_name = 'metadata' 8 | sql = ''' 9 | CREATE TABLE metadata ( 10 | name text NOT NULL PRIMARY KEY, 11 | value text)''' 12 | values = ['( "agg_tiles_hash", "D41D8CD98F00B204E9800998ECF8427E" )'] 13 | 14 | [[]] 15 | type = 'table' 16 | tbl_name = 'tiles' 17 | sql = ''' 18 | CREATE TABLE tiles ( 19 | zoom_level integer NOT NULL, 20 | tile_column integer NOT NULL, 21 | tile_row integer NOT NULL, 22 | tile_data blob, 23 | PRIMARY KEY(zoom_level, tile_column, tile_row))''' 24 | values = [] 25 | 26 | [[]] 27 | type = 'index' 28 | tbl_name = 'metadata' 29 | 30 | [[]] 31 | type = 'index' 32 | tbl_name = 'tiles' 33 | -------------------------------------------------------------------------------- /tests/expected/auto/catalog_auto.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | transfer-encoding: chunked 4 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 5 | -------------------------------------------------------------------------------- /tests/expected/auto/cmp.json: -------------------------------------------------------------------------------- 1 | { 2 | "bounds": [ 3 | -179.27313970132585, 4 | -80.46177157848345, 5 | 179.11187181086706, 6 | 84.93092095128937 7 | ], 8 | "description": "public.points1.geom\npublic.points2.geom", 9 | "name": "table_source,points1,points2", 10 | "tilejson": "3.0.0", 11 | "tiles": [ 12 | "http://localhost:3111/table_source,points1,points2/{z}/{x}/{y}" 13 | ], 14 | "vector_layers": [ 15 | { 16 | "fields": { 17 | "gid": "int4" 18 | }, 19 | "id": "table_source" 20 | }, 21 | { 22 | "fields": { 23 | "gid": "int4" 24 | }, 25 | "id": "points1" 26 | }, 27 | { 28 | "fields": { 29 | "gid": "int4" 30 | }, 31 | "id": "points2" 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /tests/expected/auto/cmp.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"1a7-SKz0jISgY5NokLA90cn9bQ==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/cmp_0_0_0.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/cmp_0_0_0.pbf -------------------------------------------------------------------------------- /tests/expected/auto/cmp_0_0_0.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 1150 3 | content-type: application/x-protobuf 4 | etag: "293815559851244067215006259112061301509" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/cmp_12_3673_1911.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/cmp_12_3673_1911.pbf -------------------------------------------------------------------------------- /tests/expected/auto/cmp_12_3673_1911.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 228 3 | content-type: application/x-protobuf 4 | etag: "65126464844181472926168475650420052208" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/cmp_13_7346_3822.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/cmp_13_7346_3822.pbf -------------------------------------------------------------------------------- /tests/expected/auto/cmp_13_7346_3822.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 229 3 | content-type: application/x-protobuf 4 | etag: "285993515030094388663176915274199952144" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/cmp_14_14692_7645.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/cmp_14_14692_7645.pbf -------------------------------------------------------------------------------- /tests/expected/auto/cmp_14_14692_7645.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 241 3 | content-type: application/x-protobuf 4 | etag: "311485364959417352099842717473316722909" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/cmp_17_117542_61161.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/cmp_17_117542_61161.pbf -------------------------------------------------------------------------------- /tests/expected/auto/cmp_17_117542_61161.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 253 3 | content-type: application/x-protobuf 4 | etag: "45271956850074002467276433108641392681" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/cmp_18_235085_122323.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/cmp_18_235085_122323.pbf -------------------------------------------------------------------------------- /tests/expected/auto/cmp_18_235085_122323.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 255 3 | content-type: application/x-protobuf 4 | etag: "27476821680655535149048155649476331810" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/cmp_6_57_29.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/cmp_6_57_29.pbf -------------------------------------------------------------------------------- /tests/expected/auto/cmp_6_57_29.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 181 3 | content-type: application/x-protobuf 4 | etag: "318858893996331708671731244488057597244" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": { 3 | "bar": "foo" 4 | }, 5 | "name": "function_zxy_query", 6 | "tilejson": "3.0.0", 7 | "tiles": [ 8 | "http://localhost:3111/function_zxy_query/{z}/{x}/{y}" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"85-6Q4dOREWZNsdPdT5r-Pjvg==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_0_0_0.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/fnc_0_0_0.pbf -------------------------------------------------------------------------------- /tests/expected/auto/fnc_0_0_0.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 546 3 | content-type: application/x-protobuf 4 | etag: "50104397035412006126955407492289337352" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_12_3673_1911.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/fnc_12_3673_1911.pbf -------------------------------------------------------------------------------- /tests/expected/auto/fnc_12_3673_1911.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 131 3 | content-type: application/x-protobuf 4 | etag: "316036929976559733097913904358871580694" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_13_7346_3822.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/fnc_13_7346_3822.pbf -------------------------------------------------------------------------------- /tests/expected/auto/fnc_13_7346_3822.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 133 3 | content-type: application/x-protobuf 4 | etag: "186991199734742473829029472341770943562" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_14_14692_7645.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/fnc_14_14692_7645.pbf -------------------------------------------------------------------------------- /tests/expected/auto/fnc_14_14692_7645.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 141 3 | content-type: application/x-protobuf 4 | etag: "270799230191288586610033918771820004719" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_17_117542_61161.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/fnc_17_117542_61161.pbf -------------------------------------------------------------------------------- /tests/expected/auto/fnc_17_117542_61161.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 146 3 | content-type: application/x-protobuf 4 | etag: "59732876737746661838673831051212271461" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_18_235085_122323.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/fnc_18_235085_122323.pbf -------------------------------------------------------------------------------- /tests/expected/auto/fnc_18_235085_122323.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 150 3 | content-type: application/x-protobuf 4 | etag: "188910840057561700607644193135209710567" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_6_57_29.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/fnc_6_57_29.pbf -------------------------------------------------------------------------------- /tests/expected/auto/fnc_6_57_29.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 106 3 | content-type: application/x-protobuf 4 | etag: "148595474743525054411317108796671227677" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_b.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "public.function_zxy_query_jsonb", 3 | "name": "function_zxy_query_jsonb", 4 | "tilejson": "3.0.0", 5 | "tiles": [ 6 | "http://localhost:3111/function_zxy_query_jsonb/{z}/{x}/{y}" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_b.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"ad-WumWK2dl9zyB9VKNT00Jkg==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_b_6_38_20.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/fnc_b_6_38_20.pbf -------------------------------------------------------------------------------- /tests/expected/auto/fnc_b_6_38_20.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 110 3 | content-type: application/x-protobuf 4 | etag: "339404027429166108039741083243940146201" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_comment.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "a function source with MixedCase name", 3 | "name": "function_Mixed_Name", 4 | "tilejson": "3.0.0", 5 | "tiles": [ 6 | "http://localhost:3111/function_Mixed_Name/{z}/{x}/{y}" 7 | ], 8 | "vector_layers": [ 9 | { 10 | "fields": { 11 | "Geom": "", 12 | "TABLE": "" 13 | }, 14 | "id": "MixedCase.function_Mixed_Name" 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_comment.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"102-6tbS_Y0ey_fK7fkhJd4WKQ==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_token.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "public.function_zxy_query_test", 3 | "name": "function_zxy_query_test", 4 | "tilejson": "3.0.0", 5 | "tiles": [ 6 | "http://localhost:3111/function_zxy_query_test/{z}/{x}/{y}" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_token.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"aa-aH357MWBb3myW2xPJ6n6iw==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_token_0_0_0.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/fnc_token_0_0_0.pbf -------------------------------------------------------------------------------- /tests/expected/auto/fnc_token_0_0_0.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 551 3 | content-type: application/x-protobuf 4 | etag: "197420765542523001088152476290493617488" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_zoom_xy_6_57_29.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/fnc_zoom_xy_6_57_29.pbf -------------------------------------------------------------------------------- /tests/expected/auto/fnc_zoom_xy_6_57_29.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 104 3 | content-type: application/x-protobuf 4 | etag: "313925108765747031844863332687426553785" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_zxy2_6_57_29.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/fnc_zxy2_6_57_29.pbf -------------------------------------------------------------------------------- /tests/expected/auto/fnc_zxy2_6_57_29.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 103 3 | content-type: application/x-protobuf 4 | etag: "134723745777099237261560614323384911032" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_zxy_6_57_29.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/fnc_zxy_6_57_29.pbf -------------------------------------------------------------------------------- /tests/expected/auto/fnc_zxy_6_57_29.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 101 3 | content-type: application/x-protobuf 4 | etag: "234076532504863321998415269051837419664" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_zxy_query_6_57_29.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/fnc_zxy_query_6_57_29.pbf -------------------------------------------------------------------------------- /tests/expected/auto/fnc_zxy_query_6_57_29.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 106 3 | content-type: application/x-protobuf 4 | etag: "148595474743525054411317108796671227677" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_zxy_row2_6_57_29.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/fnc_zxy_row2_6_57_29.pbf -------------------------------------------------------------------------------- /tests/expected/auto/fnc_zxy_row2_6_57_29.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 115 3 | content-type: application/x-protobuf 4 | etag: "205494963574970857606832668009198552781" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_zxy_row_6_57_29.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/fnc_zxy_row_6_57_29.pbf -------------------------------------------------------------------------------- /tests/expected/auto/fnc_zxy_row_6_57_29.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 107 3 | content-type: application/x-protobuf 4 | etag: "133204562788894152562072143322114701432" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/fnc_zxy_row_key_6_57_29.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/fnc_zxy_row_key_6_57_29.pbf -------------------------------------------------------------------------------- /tests/expected/auto/fnc_zxy_row_key_6_57_29.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 107 3 | content-type: application/x-protobuf 4 | etag: "18077437226671957325453576147625224838" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/mb_jpg.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"31fe-1IOZwmkS4fjYIp-JzMoTpA==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/mb_jpg_0_0_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/mb_jpg_0_0_0.jpg -------------------------------------------------------------------------------- /tests/expected/auto/mb_jpg_0_0_0.jpg.headers: -------------------------------------------------------------------------------- 1 | content-length: 22142 2 | content-type: image/jpeg 3 | etag: "80104354369725283657331287868672010947" 4 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 5 | -------------------------------------------------------------------------------- /tests/expected/auto/mb_jpg_0_0_0.jpg.txt: -------------------------------------------------------------------------------- 1 | tests/output/auto/mb_jpg_0_0_0.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, baseline, precision 8, 256x256, components 3 2 | -------------------------------------------------------------------------------- /tests/expected/auto/mb_mvt.json: -------------------------------------------------------------------------------- 1 | { 2 | "bounds": [ 3 | -123.12359, 4 | -37.818085, 5 | 174.763027, 6 | 59.352706 7 | ], 8 | "center": [ 9 | -75.9375, 10 | 38.788894, 11 | 6 12 | ], 13 | "description": "Major cities from Natural Earth data", 14 | "format": "pbf", 15 | "maxzoom": 6, 16 | "minzoom": 0, 17 | "name": "Major cities from Natural Earth data", 18 | "tilejson": "3.0.0", 19 | "tiles": [ 20 | "http://localhost:3111/world_cities/{z}/{x}/{y}" 21 | ], 22 | "vector_layers": [ 23 | { 24 | "description": "", 25 | "fields": { 26 | "name": "String" 27 | }, 28 | "id": "cities", 29 | "maxzoom": 6, 30 | "minzoom": 0 31 | } 32 | ], 33 | "version": "2" 34 | } 35 | -------------------------------------------------------------------------------- /tests/expected/auto/mb_mvt.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"1a3-AgILNjTcvIE3t7rN3x0S0Q==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/mb_mvt_2_3_1.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/mb_mvt_2_3_1.pbf -------------------------------------------------------------------------------- /tests/expected/auto/mb_mvt_2_3_1.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 263 3 | content-type: application/x-protobuf 4 | etag: "271488406274339672223474380565368146077" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/mb_png.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"3214-OmIr3Ec0hZORLhvVAfcjXg==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/mb_png_0_0_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/mb_png_0_0_0.png -------------------------------------------------------------------------------- /tests/expected/auto/mb_png_0_0_0.png.headers: -------------------------------------------------------------------------------- 1 | content-length: 21246 2 | content-type: image/png 3 | etag: "198224485858177844679225803711953162005" 4 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 5 | -------------------------------------------------------------------------------- /tests/expected/auto/mb_png_0_0_0.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/auto/mb_png_0_0_0.png: PNG image data, 256 x 256, 8-bit colormap, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/auto/pmt.json: -------------------------------------------------------------------------------- 1 | { 2 | "bounds": [ 3 | -180, 4 | -85, 5 | 180, 6 | 85 7 | ], 8 | "center": [ 9 | 0, 10 | 0, 11 | 0 12 | ], 13 | "maxzoom": 3, 14 | "minzoom": 0, 15 | "tilejson": "3.0.0", 16 | "tiles": [ 17 | "http://localhost:3111/stamen_toner__raster_CC-BY-ODbL_z3/{z}/{x}/{y}" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /tests/expected/auto/pmt.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"b5-iGXOSKeGzUc1iuu-TdN9rg==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/pmt_3_4_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/pmt_3_4_2.png -------------------------------------------------------------------------------- /tests/expected/auto/pmt_3_4_2.png.headers: -------------------------------------------------------------------------------- 1 | content-length: 24475 2 | content-type: image/png 3 | etag: "183528903823100539089486478518670939939" 4 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 5 | -------------------------------------------------------------------------------- /tests/expected/auto/pmt_3_4_2.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/auto/pmt_3_4_2.png: PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/auto/points3857_srid.json: -------------------------------------------------------------------------------- 1 | { 2 | "bounds": [ 3 | -161.40590777554058, 4 | -81.50727021609012, 5 | 172.51549126768532, 6 | 84.2440187164111 7 | ], 8 | "description": "public.points3857.geom", 9 | "name": "points3857", 10 | "tilejson": "3.0.0", 11 | "tiles": [ 12 | "http://localhost:3111/points3857/{z}/{x}/{y}" 13 | ], 14 | "vector_layers": [ 15 | { 16 | "fields": { 17 | "gid": "int4" 18 | }, 19 | "id": "points3857" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /tests/expected/auto/points3857_srid.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"11c-4GaQ__e5mrlIrmds-0KbWA==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/points3857_srid_0_0_0.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/points3857_srid_0_0_0.pbf -------------------------------------------------------------------------------- /tests/expected/auto/points3857_srid_0_0_0.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 339 3 | content-type: application/x-protobuf 4 | etag: "335534992707089786783362253468276926462" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/points_empty_srid_0_0_0.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/points_empty_srid_0_0_0.pbf -------------------------------------------------------------------------------- /tests/expected/auto/points_empty_srid_0_0_0.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 351 3 | content-type: application/x-protobuf 4 | etag: "90067240564968210473015739826054346984" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/rgb_u8.json: -------------------------------------------------------------------------------- 1 | { 2 | "maxzoom": 3, 3 | "minzoom": 0, 4 | "tilejson": "3.0.0", 5 | "tiles": [ 6 | "http://localhost:3111/rgb_u8/{z}/{x}/{y}" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /tests/expected/auto/rgb_u8.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"61-IE-cuTwRcHu2Y_TNihoCYQ==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/rgb_u8_0_0_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/rgb_u8_0_0_0.png -------------------------------------------------------------------------------- /tests/expected/auto/rgb_u8_0_0_0.png.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 1465 3 | content-type: image/png 4 | etag: "91976870190390495135239397880759423411" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/rgb_u8_0_0_0.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/auto/rgb_u8_0_0_0.png: PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/auto/rgb_u8_3_0_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/rgb_u8_3_0_0.png -------------------------------------------------------------------------------- /tests/expected/auto/rgb_u8_3_0_0.png.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 26676 3 | content-type: image/png 4 | etag: "152292509766006539164689338463649870217" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/rgb_u8_3_0_0.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/auto/rgb_u8_3_0_0.png: PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/auto/rgb_u8_3_1_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/rgb_u8_3_1_1.png -------------------------------------------------------------------------------- /tests/expected/auto/rgb_u8_3_1_1.png.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 294 3 | content-type: image/png 4 | etag: "183196322924765665630178019653551670231" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/rgb_u8_3_1_1.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/auto/rgb_u8_3_1_1.png: PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/auto/rgba_u8.json: -------------------------------------------------------------------------------- 1 | { 2 | "maxzoom": 3, 3 | "minzoom": 0, 4 | "tilejson": "3.0.0", 5 | "tiles": [ 6 | "http://localhost:3111/rgba_u8/{z}/{x}/{y}" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /tests/expected/auto/rgba_u8.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"62-BrVv6ZXdmCdQ_wrDTr0tSw==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/rgba_u8_0_0_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/rgba_u8_0_0_0.png -------------------------------------------------------------------------------- /tests/expected/auto/rgba_u8_0_0_0.png.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 1465 3 | content-type: image/png 4 | etag: "91976870190390495135239397880759423411" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/rgba_u8_0_0_0.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/auto/rgba_u8_0_0_0.png: PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/auto/rgba_u8_3_0_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/rgba_u8_3_0_0.png -------------------------------------------------------------------------------- /tests/expected/auto/rgba_u8_3_0_0.png.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 26676 3 | content-type: image/png 4 | etag: "152292509766006539164689338463649870217" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/rgba_u8_3_0_0.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/auto/rgba_u8_3_0_0.png: PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/auto/rgba_u8_3_1_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/rgba_u8_3_1_1.png -------------------------------------------------------------------------------- /tests/expected/auto/rgba_u8_3_1_1.png.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 294 3 | content-type: image/png 4 | etag: "183196322924765665630178019653551670231" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/rgba_u8_3_1_1.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/auto/rgba_u8_3_1_1.png: PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/auto/rgba_u8_nodata.json: -------------------------------------------------------------------------------- 1 | { 2 | "maxzoom": 2, 3 | "minzoom": 0, 4 | "tilejson": "3.0.0", 5 | "tiles": [ 6 | "http://localhost:3111/rgba_u8_nodata/{z}/{x}/{y}" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /tests/expected/auto/rgba_u8_nodata.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"69-f7ZqJowAoXXdyYxlTrEd6g==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/rgba_u8_nodata_0_0_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/rgba_u8_nodata_0_0_0.png -------------------------------------------------------------------------------- /tests/expected/auto/rgba_u8_nodata_0_0_0.png.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 4183 3 | content-type: image/png 4 | etag: "175670914983401421558985743183658650265" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/rgba_u8_nodata_0_0_0.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/auto/rgba_u8_nodata_0_0_0.png: PNG image data, 512 x 512, 8-bit/color RGBA, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/auto/rgba_u8_nodata_1_0_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/rgba_u8_nodata_1_0_0.png -------------------------------------------------------------------------------- /tests/expected/auto/rgba_u8_nodata_1_0_0.png.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 12297 3 | content-type: image/png 4 | etag: "275838721038394963229380057336169680030" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/rgba_u8_nodata_1_0_0.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/auto/rgba_u8_nodata_1_0_0.png: PNG image data, 512 x 512, 8-bit/color RGBA, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/auto/s3_1_0_0.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/s3_1_0_0.pbf -------------------------------------------------------------------------------- /tests/expected/auto/s3_1_0_0.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 215320 3 | content-type: application/x-protobuf 4 | etag: "90893510347658296425614750151245557991" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/table_source.json: -------------------------------------------------------------------------------- 1 | { 2 | "bounds": [ 3 | -2, 4 | -1, 5 | 142.84131509869133, 6 | 45 7 | ], 8 | "foo": { 9 | "bar": "foo" 10 | }, 11 | "name": "table_source", 12 | "tilejson": "3.0.0", 13 | "tiles": [ 14 | "http://localhost:3111/table_source/{z}/{x}/{y}" 15 | ], 16 | "vector_layers": [ 17 | { 18 | "fields": { 19 | "gid": "int4" 20 | }, 21 | "id": "table_source" 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /tests/expected/auto/table_source.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"e6-fbngdmxBgtzD9fRcDwLqMA==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/tbl_0_0_0.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/tbl_0_0_0.pbf -------------------------------------------------------------------------------- /tests/expected/auto/tbl_0_0_0.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 643 3 | content-type: application/x-protobuf 4 | etag: "318577514554804226527507038699986111507" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/tbl_12_3673_1911.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/tbl_12_3673_1911.pbf -------------------------------------------------------------------------------- /tests/expected/auto/tbl_12_3673_1911.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 166 3 | content-type: application/x-protobuf 4 | etag: "165500331794974714696813048024659138693" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/tbl_13_7346_3822.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/tbl_13_7346_3822.pbf -------------------------------------------------------------------------------- /tests/expected/auto/tbl_13_7346_3822.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 171 3 | content-type: application/x-protobuf 4 | etag: "182700208357754381587588584330146829039" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/tbl_14_14692_7645.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/tbl_14_14692_7645.pbf -------------------------------------------------------------------------------- /tests/expected/auto/tbl_14_14692_7645.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 178 3 | content-type: application/x-protobuf 4 | etag: "117583176155265660497702615009162345318" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/tbl_17_117542_61161.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/tbl_17_117542_61161.pbf -------------------------------------------------------------------------------- /tests/expected/auto/tbl_17_117542_61161.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 182 3 | content-type: application/x-protobuf 4 | etag: "23665348455771460600771393648920396528" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/tbl_18_235085_122323.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/tbl_18_235085_122323.pbf -------------------------------------------------------------------------------- /tests/expected/auto/tbl_18_235085_122323.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 181 3 | content-type: application/x-protobuf 4 | etag: "33647617359663494862827377733789484216" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/tbl_6_57_29.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/tbl_6_57_29.pbf -------------------------------------------------------------------------------- /tests/expected/auto/tbl_6_57_29.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 138 3 | content-type: application/x-protobuf 4 | etag: "198829004322648368710297325251207900127" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/tbl_comment.json: -------------------------------------------------------------------------------- 1 | { 2 | "bounds": [ 3 | -170.94984639004662, 4 | -84.20025580733805, 5 | 167.70892858284475, 6 | 74.23573284753762 7 | ], 8 | "description": "a description from comment on table", 9 | "name": "MixPoints", 10 | "tilejson": "3.0.0", 11 | "tiles": [ 12 | "http://localhost:3111/MixPoints/{z}/{x}/{y}" 13 | ], 14 | "vector_layers": [ 15 | { 16 | "fields": { 17 | "Gid": "int4", 18 | "TABLE": "text" 19 | }, 20 | "id": "MixPoints" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /tests/expected/auto/tbl_comment.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"136-lHzPvh-7gSnjgJnd-2ctzQ==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/auto/webp2_1_0_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/auto/webp2_1_0_0.png -------------------------------------------------------------------------------- /tests/expected/auto/webp2_1_0_0.png.headers: -------------------------------------------------------------------------------- 1 | content-length: 10658 2 | content-type: image/webp 3 | etag: "13022905490801985056512160688182263905" 4 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 5 | -------------------------------------------------------------------------------- /tests/expected/auto/webp2_1_0_0.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/auto/webp2_1_0_0.png: RIFF (little-endian) data, Web/P image, VP8 encoding, 512x512, Scaling: [none]x[none], YUV color, decoders should clamp 2 | -------------------------------------------------------------------------------- /tests/expected/auto_mini/catalog_auto.json: -------------------------------------------------------------------------------- 1 | { 2 | "fonts": {}, 3 | "sprites": {}, 4 | "styles": {}, 5 | "tiles": { 6 | "webp2": { 7 | "content_type": "image/webp", 8 | "name": "ne2sr" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tests/expected/auto_mini/catalog_auto.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | transfer-encoding: chunked 4 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 5 | -------------------------------------------------------------------------------- /tests/expected/auto_mini/save_config.yaml: -------------------------------------------------------------------------------- 1 | listen_addresses: localhost:3111 2 | pmtiles: 3 | paths: tests/fixtures/pmtiles2 4 | sources: 5 | webp2: tests/fixtures/pmtiles2/webp2.pmtiles 6 | mbtiles: tests/fixtures/pmtiles2 7 | cog: tests/fixtures/pmtiles2 8 | -------------------------------------------------------------------------------- /tests/expected/configured/catalog_cfg.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | transfer-encoding: chunked 4 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 5 | -------------------------------------------------------------------------------- /tests/expected/configured/cmp.json: -------------------------------------------------------------------------------- 1 | { 2 | "bounds": [ 3 | -180, 4 | -90, 5 | 180, 6 | 90 7 | ], 8 | "description": "public.points1.geom\npublic.points2.geom", 9 | "maxzoom": 30, 10 | "minzoom": 0, 11 | "name": "table_source,points1,points2", 12 | "tilejson": "3.0.0", 13 | "tiles": [ 14 | "http://localhost:3111/table_source,points1,points2/{z}/{x}/{y}" 15 | ], 16 | "vector_layers": [ 17 | { 18 | "fields": { 19 | "gid": "int4" 20 | }, 21 | "id": "table_source" 22 | }, 23 | { 24 | "fields": { 25 | "gid": "int4" 26 | }, 27 | "id": "abc" 28 | }, 29 | { 30 | "fields": { 31 | "gid": "int4" 32 | }, 33 | "id": "points2" 34 | } 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /tests/expected/configured/cmp.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"188-1_yQANTYBHv0kaBoGJCqKQ==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/cmp_0_0_0.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/configured/cmp_0_0_0.pbf -------------------------------------------------------------------------------- /tests/expected/configured/cmp_0_0_0.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 576 3 | content-type: application/x-protobuf 4 | etag: "176859989575845169917449959758474492937" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/fnc2_0_0_0.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/configured/fnc2_0_0_0.pbf -------------------------------------------------------------------------------- /tests/expected/configured/fnc2_0_0_0.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 551 3 | content-type: application/x-protobuf 4 | etag: "197420765542523001088152476290493617488" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/fnc_0_0_0.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/configured/fnc_0_0_0.pbf -------------------------------------------------------------------------------- /tests/expected/configured/fnc_0_0_0.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 546 3 | content-type: application/x-protobuf 4 | etag: "50104397035412006126955407492289337352" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/fnc_comment_cfg.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "a function source with MixedCase name", 3 | "name": "fnc_Mixed_Name", 4 | "tilejson": "3.0.0", 5 | "tiles": [ 6 | "http://localhost:3111/fnc_Mixed_Name/{z}/{x}/{y}" 7 | ], 8 | "vector_layers": [ 9 | { 10 | "fields": { 11 | "Geom": "", 12 | "TABLE": "" 13 | }, 14 | "id": "MixedCase.function_Mixed_Name" 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /tests/expected/configured/fnc_comment_cfg.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"f8-Q_61CSCILe6RIhIWzTvf_Q==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/font_1.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/configured/font_1.pbf -------------------------------------------------------------------------------- /tests/expected/configured/font_1.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/x-protobuf 3 | etag: W/"130b6-leolMlz39eG1OisHJXWcdA==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/font_2.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/configured/font_2.pbf -------------------------------------------------------------------------------- /tests/expected/configured/font_2.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/x-protobuf 3 | etag: W/"13762-12Po9LfxnAVc5cwSQZI0Bg==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/font_3.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/configured/font_3.pbf -------------------------------------------------------------------------------- /tests/expected/configured/font_3.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/x-protobuf 3 | etag: W/"13762-12Po9LfxnAVc5cwSQZI0Bg==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/pmt2_0_0_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/configured/pmt2_0_0_0.png -------------------------------------------------------------------------------- /tests/expected/configured/pmt2_0_0_0.png.headers: -------------------------------------------------------------------------------- 1 | content-length: 11586 2 | content-type: image/webp 3 | etag: "319069140686520200453324848169489853378" 4 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 5 | -------------------------------------------------------------------------------- /tests/expected/configured/pmt2_0_0_0.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/configured/pmt2_0_0_0.png: RIFF (little-endian) data, Web/P image 2 | -------------------------------------------------------------------------------- /tests/expected/configured/pmt_0_0_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/configured/pmt_0_0_0.png -------------------------------------------------------------------------------- /tests/expected/configured/pmt_0_0_0.png.headers: -------------------------------------------------------------------------------- 1 | content-length: 18404 2 | content-type: image/png 3 | etag: "109615783887137800409763947330857640552" 4 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 5 | -------------------------------------------------------------------------------- /tests/expected/configured/pmt_0_0_0.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/configured/pmt_0_0_0.png: PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_cmp.json: -------------------------------------------------------------------------------- 1 | { 2 | "another_bicycle": { 3 | "height": 21, 4 | "pixelRatio": 1, 5 | "sdf": true, 6 | "width": 21, 7 | "x": 26, 8 | "y": 22 9 | }, 10 | "bear": { 11 | "height": 22, 12 | "pixelRatio": 1, 13 | "sdf": true, 14 | "width": 22, 15 | "x": 26, 16 | "y": 0 17 | }, 18 | "bicycle": { 19 | "height": 21, 20 | "pixelRatio": 1, 21 | "sdf": true, 22 | "width": 21, 23 | "x": 0, 24 | "y": 26 25 | }, 26 | "sub/circle": { 27 | "height": 26, 28 | "pixelRatio": 1, 29 | "sdf": true, 30 | "width": 26, 31 | "x": 0, 32 | "y": 0 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_cmp.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"131-s95fKXweVNtXjVXT7l2oHQ==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_cmp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/configured/sdf_spr_cmp.png -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_cmp.png.headers: -------------------------------------------------------------------------------- 1 | content-length: 945 2 | content-type: image/png 3 | etag: W/"3b1-qyh8Bev0R5Z2fLn83grsPw==" 4 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 5 | -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_cmp.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/configured/sdf_spr_cmp.png: PNG image data, 48 x 47, 8-bit gray+alpha, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_cmp_2.json: -------------------------------------------------------------------------------- 1 | { 2 | "another_bicycle": { 3 | "height": 36, 4 | "pixelRatio": 2, 5 | "sdf": true, 6 | "width": 36, 7 | "x": 84, 8 | "y": 0 9 | }, 10 | "bear": { 11 | "height": 38, 12 | "pixelRatio": 2, 13 | "sdf": true, 14 | "width": 38, 15 | "x": 46, 16 | "y": 0 17 | }, 18 | "bicycle": { 19 | "height": 36, 20 | "pixelRatio": 2, 21 | "sdf": true, 22 | "width": 36, 23 | "x": 84, 24 | "y": 36 25 | }, 26 | "sub/circle": { 27 | "height": 46, 28 | "pixelRatio": 2, 29 | "sdf": true, 30 | "width": 46, 31 | "x": 0, 32 | "y": 0 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_cmp_2.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"131-Bjo8hrRKhIMOqK572ImviA==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_cmp_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/configured/sdf_spr_cmp_2.png -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_cmp_2.png.headers: -------------------------------------------------------------------------------- 1 | content-length: 1863 2 | content-type: image/png 3 | etag: W/"747-uY5SJOmaA0qgk9TmFw54yw==" 4 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 5 | -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_cmp_2.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/configured/sdf_spr_cmp_2.png: PNG image data, 120 x 72, 8-bit gray+alpha, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_mysrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "bicycle": { 3 | "height": 36, 4 | "pixelRatio": 2, 5 | "sdf": true, 6 | "width": 36, 7 | "x": 0, 8 | "y": 0 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_mysrc.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"4a-2PGKEoQ361taeiNAqH1Hyg==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_mysrc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/configured/sdf_spr_mysrc.png -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_mysrc.png.headers: -------------------------------------------------------------------------------- 1 | content-length: 675 2 | content-type: image/png 3 | etag: W/"2a3-ju0zA7FbYbeaqMM_Qg1Iqg==" 4 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 5 | -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_mysrc.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/configured/sdf_spr_mysrc.png: PNG image data, 36 x 36, 8-bit gray+alpha, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_src1.json: -------------------------------------------------------------------------------- 1 | { 2 | "another_bicycle": { 3 | "height": 21, 4 | "pixelRatio": 1, 5 | "sdf": true, 6 | "width": 21, 7 | "x": 26, 8 | "y": 22 9 | }, 10 | "bear": { 11 | "height": 22, 12 | "pixelRatio": 1, 13 | "sdf": true, 14 | "width": 22, 15 | "x": 26, 16 | "y": 0 17 | }, 18 | "sub/circle": { 19 | "height": 26, 20 | "pixelRatio": 1, 21 | "sdf": true, 22 | "width": 26, 23 | "x": 0, 24 | "y": 0 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_src1.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"e7-7ie4iOXghXewTq4x5OKswg==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_src1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/configured/sdf_spr_src1.png -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_src1.png.headers: -------------------------------------------------------------------------------- 1 | content-length: 900 2 | content-type: image/png 3 | etag: W/"384-m3iOSdyLqIRO-1uu8tzIcw==" 4 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 5 | -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_src1.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/configured/sdf_spr_src1.png: PNG image data, 48 x 43, 8-bit gray+alpha, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_src1_.json: -------------------------------------------------------------------------------- 1 | { 2 | "another_bicycle": { 3 | "height": 36, 4 | "pixelRatio": 2, 5 | "sdf": true, 6 | "width": 36, 7 | "x": 84, 8 | "y": 0 9 | }, 10 | "bear": { 11 | "height": 38, 12 | "pixelRatio": 2, 13 | "sdf": true, 14 | "width": 38, 15 | "x": 46, 16 | "y": 0 17 | }, 18 | "sub/circle": { 19 | "height": 46, 20 | "pixelRatio": 2, 21 | "sdf": true, 22 | "width": 46, 23 | "x": 0, 24 | "y": 0 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_src1_.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"e6-IQNV1VuPkoio6olHvfumfg==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_src1_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/configured/sdf_spr_src1_.png -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_src1_.png.headers: -------------------------------------------------------------------------------- 1 | content-length: 1699 2 | content-type: image/png 3 | etag: W/"6a3-NdhmitklvJKSk_7phaxquw==" 4 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 5 | -------------------------------------------------------------------------------- /tests/expected/configured/sdf_spr_src1_.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/configured/sdf_spr_src1_.png: PNG image data, 120 x 46, 8-bit gray+alpha, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_cmp.json: -------------------------------------------------------------------------------- 1 | { 2 | "another_bicycle": { 3 | "height": 15, 4 | "pixelRatio": 1, 5 | "width": 15, 6 | "x": 20, 7 | "y": 16 8 | }, 9 | "bear": { 10 | "height": 16, 11 | "pixelRatio": 1, 12 | "width": 16, 13 | "x": 20, 14 | "y": 0 15 | }, 16 | "bicycle": { 17 | "height": 15, 18 | "pixelRatio": 1, 19 | "width": 15, 20 | "x": 35, 21 | "y": 16 22 | }, 23 | "sub/circle": { 24 | "height": 20, 25 | "pixelRatio": 1, 26 | "width": 20, 27 | "x": 0, 28 | "y": 0 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_cmp.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"106-vO62JYCAMTM5xx97X6qw9w==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_cmp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/configured/spr_cmp.png -------------------------------------------------------------------------------- /tests/expected/configured/spr_cmp.png.headers: -------------------------------------------------------------------------------- 1 | content-length: 785 2 | content-type: image/png 3 | etag: W/"311-u7NFzzhK-VdpDMgsJ-SjaQ==" 4 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 5 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_cmp.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/configured/spr_cmp.png: PNG image data, 50 x 31, 8-bit/color RGBA, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_cmp_2x.json: -------------------------------------------------------------------------------- 1 | { 2 | "another_bicycle": { 3 | "height": 30, 4 | "pixelRatio": 2, 5 | "width": 30, 6 | "x": 40, 7 | "y": 32 8 | }, 9 | "bear": { 10 | "height": 32, 11 | "pixelRatio": 2, 12 | "width": 32, 13 | "x": 40, 14 | "y": 0 15 | }, 16 | "bicycle": { 17 | "height": 30, 18 | "pixelRatio": 2, 19 | "width": 30, 20 | "x": 70, 21 | "y": 32 22 | }, 23 | "sub/circle": { 24 | "height": 40, 25 | "pixelRatio": 2, 26 | "width": 40, 27 | "x": 0, 28 | "y": 0 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_cmp_2x.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"106-XvyGBYKI-CKbS-pEdF5nAA==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_cmp_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/configured/spr_cmp_2x.png -------------------------------------------------------------------------------- /tests/expected/configured/spr_cmp_2x.png.headers: -------------------------------------------------------------------------------- 1 | content-length: 1755 2 | content-type: image/png 3 | etag: W/"6db-u2j270aTAu4aTfvEwg9iRA==" 4 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 5 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_cmp_2x.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/configured/spr_cmp_2x.png: PNG image data, 100 x 62, 8-bit colormap, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_mysrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "bicycle": { 3 | "height": 15, 4 | "pixelRatio": 1, 5 | "width": 15, 6 | "x": 0, 7 | "y": 0 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_mysrc.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"3f-dujM8uKY4xAnuwDPF3cq1Q==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_mysrc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/configured/spr_mysrc.png -------------------------------------------------------------------------------- /tests/expected/configured/spr_mysrc.png.headers: -------------------------------------------------------------------------------- 1 | content-length: 189 2 | content-type: image/png 3 | etag: W/"bd-wRhFV2xvMbGQOJkdFxyNyg==" 4 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 5 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_mysrc.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/configured/spr_mysrc.png: PNG image data, 15 x 15, 8-bit gray+alpha, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_mysrc_2x.json: -------------------------------------------------------------------------------- 1 | { 2 | "bicycle": { 3 | "height": 30, 4 | "pixelRatio": 2, 5 | "width": 30, 6 | "x": 0, 7 | "y": 0 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_mysrc_2x.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"3f-ZlKlqxoAjk_BolpJ5vQ4Gw==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_mysrc_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/configured/spr_mysrc_2x.png -------------------------------------------------------------------------------- /tests/expected/configured/spr_mysrc_2x.png.headers: -------------------------------------------------------------------------------- 1 | content-length: 344 2 | content-type: image/png 3 | etag: W/"158-ZSYNoWLreCScoiFLriGD6Q==" 4 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 5 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_mysrc_2x.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/configured/spr_mysrc_2x.png: PNG image data, 30 x 30, 8-bit gray+alpha, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_src1.json: -------------------------------------------------------------------------------- 1 | { 2 | "another_bicycle": { 3 | "height": 15, 4 | "pixelRatio": 1, 5 | "width": 15, 6 | "x": 20, 7 | "y": 16 8 | }, 9 | "bear": { 10 | "height": 16, 11 | "pixelRatio": 1, 12 | "width": 16, 13 | "x": 20, 14 | "y": 0 15 | }, 16 | "sub/circle": { 17 | "height": 20, 18 | "pixelRatio": 1, 19 | "width": 20, 20 | "x": 0, 21 | "y": 0 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_src1.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"c6-hm38ksFM7OrTdjwShP2iRA==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_src1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/configured/spr_src1.png -------------------------------------------------------------------------------- /tests/expected/configured/spr_src1.png.headers: -------------------------------------------------------------------------------- 1 | content-length: 758 2 | content-type: image/png 3 | etag: W/"2f6-PZaBSgIOiVTrPDnRiX0hYg==" 4 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 5 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_src1.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/configured/spr_src1.png: PNG image data, 36 x 31, 8-bit/color RGBA, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_src1_2x.json: -------------------------------------------------------------------------------- 1 | { 2 | "another_bicycle": { 3 | "height": 30, 4 | "pixelRatio": 2, 5 | "width": 30, 6 | "x": 40, 7 | "y": 32 8 | }, 9 | "bear": { 10 | "height": 32, 11 | "pixelRatio": 2, 12 | "width": 32, 13 | "x": 40, 14 | "y": 0 15 | }, 16 | "sub/circle": { 17 | "height": 40, 18 | "pixelRatio": 2, 19 | "width": 40, 20 | "x": 0, 21 | "y": 0 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_src1_2x.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"c6-4pCj2iqngMtQ6k9bdvO19w==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_src1_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/configured/spr_src1_2x.png -------------------------------------------------------------------------------- /tests/expected/configured/spr_src1_2x.png.headers: -------------------------------------------------------------------------------- 1 | content-length: 1699 2 | content-type: image/png 3 | etag: W/"6a3--J74WPHes8bNZx23r-Ru4w==" 4 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 5 | -------------------------------------------------------------------------------- /tests/expected/configured/spr_src1_2x.png.txt: -------------------------------------------------------------------------------- 1 | tests/output/configured/spr_src1_2x.png: PNG image data, 72 x 62, 8-bit colormap, non-interlaced 2 | -------------------------------------------------------------------------------- /tests/expected/configured/style_maplibre_demo.1.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"1050-ndsWDIE-ORCeUzSbybafug==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/style_maplibre_demo.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"1050-ndsWDIE-ORCeUzSbybafug==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/style_src2_maptiler_basic.1.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"3f5c-az1eu_MvSQst-tUfz9ePoQ==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/style_src2_maptiler_basic.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"3f5c-az1eu_MvSQst-tUfz9ePoQ==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/tbl_0_0_0.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/configured/tbl_0_0_0.pbf -------------------------------------------------------------------------------- /tests/expected/configured/tbl_0_0_0.pbf.headers: -------------------------------------------------------------------------------- 1 | content-encoding: gzip 2 | content-length: 643 3 | content-type: application/x-protobuf 4 | etag: "318577514554804226527507038699986111507" 5 | vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/configured/tbl_comment_cfg.json: -------------------------------------------------------------------------------- 1 | { 2 | "bounds": [ 3 | -170.94984639004662, 4 | -84.20025580733805, 5 | 167.70892858284475, 6 | 74.23573284753762 7 | ], 8 | "description": "a description from comment on table", 9 | "name": "MixPoints", 10 | "tilejson": "3.0.0", 11 | "tiles": [ 12 | "http://localhost:3111/MixPoints/{z}/{x}/{y}" 13 | ], 14 | "vector_layers": [ 15 | { 16 | "fields": { 17 | "Gid": "int4", 18 | "TABLE": "text" 19 | }, 20 | "id": "MixPoints" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /tests/expected/configured/tbl_comment_cfg.json.headers: -------------------------------------------------------------------------------- 1 | content-encoding: br 2 | content-type: application/json 3 | etag: W/"136-lHzPvh-7gSnjgJnd-2ctzQ==" 4 | transfer-encoding: chunked 5 | vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers 6 | -------------------------------------------------------------------------------- /tests/expected/martin-cp/flat-with-hash_metadata.txt: -------------------------------------------------------------------------------- 1 | [INFO ] Using 'mvt' tile format from metadata table in file cp_flat-with-hash 2 | id: cp_flat-with-hash 3 | tile_info: 4 | format: mvt 5 | encoding: '' 6 | tilejson: 7 | tilejson: 3.0.0 8 | tiles: [] 9 | description: public.function_zxy_query_test 10 | maxzoom: 6 11 | minzoom: 0 12 | name: function_zxy_query_test 13 | format: pbf 14 | generator: martin-cp v0.0.0 15 | agg_tiles_hash: 9B931A386D6075D1DA55323BD4DBEDAE 16 | 17 | -------------------------------------------------------------------------------- /tests/expected/martin-cp/flat-with-hash_summary.txt: -------------------------------------------------------------------------------- 1 | MBTiles file summary for tests/mbtiles_temp_files/cp_flat-with-hash.mbtiles 2 | Schema: flat-with-hash 3 | Page size: 512B 4 | 5 | Zoom | Count | Smallest | Largest | Average | Bounding Box 6 | 0 | 1 | 892B | 892B | 892B | -180,-85,180,85 7 | 1 | 4 | 474B | 983B | 609B | -180,-85,180,85 8 | 2 | 5 | 150B | 865B | 451B | -90,-67,180,67 9 | 3 | 8 | 57B | 839B | 264B | -45,-41,180,67 10 | 4 | 13 | 57B | 751B | 216B | -23,-22,158,56 11 | 5 | 27 | 57B | 666B | 167B | -11,-11,146,49 12 | 6 | 69 | 57B | 636B | 127B | -6,-6,146,45 13 | all | 127 | 57B | 983B | 187B | -180,-85,180,85 14 | 15 | -------------------------------------------------------------------------------- /tests/expected/martin-cp/flat-with-hash_validate.txt: -------------------------------------------------------------------------------- 1 | [INFO ] Quick integrity check passed for tests/mbtiles_temp_files/cp_flat-with-hash.mbtiles 2 | [INFO ] All values in the `tiles` table/view are valid for tests/mbtiles_temp_files/cp_flat-with-hash.mbtiles 3 | [INFO ] All tile hashes are valid for tests/mbtiles_temp_files/cp_flat-with-hash.mbtiles 4 | -------------------------------------------------------------------------------- /tests/expected/martin-cp/flat_metadata.txt: -------------------------------------------------------------------------------- 1 | [INFO ] cp_flat has an unrecognized metadata value foo={"bar":"foo"} 2 | id: cp_flat 3 | tile_info: 4 | format: mvt 5 | encoding: gzip 6 | tilejson: 7 | tilejson: 3.0.0 8 | tiles: [] 9 | vector_layers: 10 | - id: table_source 11 | fields: 12 | gid: int4 13 | bounds: 14 | - -2.0 15 | - -1.0 16 | - 142.84131509869133 17 | - 45.0 18 | maxzoom: 6 19 | minzoom: 0 20 | name: table_source 21 | foo: '{"bar":"foo"}' 22 | format: pbf 23 | generator: martin-cp v0.0.0 24 | agg_tiles_hash: 7323D1D8A07A7176998822DB65E08567 25 | 26 | -------------------------------------------------------------------------------- /tests/expected/martin-cp/flat_summary.txt: -------------------------------------------------------------------------------- 1 | MBTiles file summary for tests/mbtiles_temp_files/cp_flat.mbtiles 2 | Schema: flat 3 | Page size: 512B 4 | 5 | Zoom | Count | Smallest | Largest | Average | Bounding Box 6 | 0 | 1 | 643B | 643B | 643B | -180,-85,180,85 7 | 1 | 4 | 338B | 705B | 439B | -180,-85,180,85 8 | 2 | 5 | 123B | 690B | 356B | -90,-67,180,67 9 | 3 | 8 | 75B | 727B | 245B | -45,-41,180,67 10 | 4 | 13 | 75B | 684B | 225B | -23,-22,158,56 11 | 5 | 27 | 75B | 659B | 195B | -11,-11,146,49 12 | 6 | 69 | 75B | 633B | 155B | -6,-6,146,45 13 | all | 127 | 75B | 727B | 197B | -180,-85,180,85 14 | 15 | -------------------------------------------------------------------------------- /tests/expected/martin-cp/flat_validate.txt: -------------------------------------------------------------------------------- 1 | [INFO ] Quick integrity check passed for tests/mbtiles_temp_files/cp_flat.mbtiles 2 | [INFO ] All values in the `tiles` table/view are valid for tests/mbtiles_temp_files/cp_flat.mbtiles 3 | [INFO ] Skipping per-tile hash validation because this is a flat MBTiles file 4 | -------------------------------------------------------------------------------- /tests/expected/martin-cp/no-source_metadata.txt: -------------------------------------------------------------------------------- 1 | id: cp_no-source 2 | tile_info: 3 | format: mvt 4 | encoding: gzip 5 | tilejson: 6 | tilejson: 3.0.0 7 | tiles: [] 8 | vector_layers: 9 | - id: cities 10 | fields: 11 | name: String 12 | description: '' 13 | maxzoom: 6 14 | minzoom: 0 15 | bounds: 16 | - -123.12359 17 | - -37.818085 18 | - 174.763027 19 | - 59.352706 20 | center: 21 | - -75.9375 22 | - 38.788894 23 | - 6 24 | description: Major cities from Natural Earth data 25 | maxzoom: 6 26 | minzoom: 0 27 | name: Major cities from Natural Earth data 28 | version: '2' 29 | format: pbf 30 | generator: martin-cp v0.0.0 31 | agg_tiles_hash: 2AEC2DC0D41746C548A2ABEC8C4CF366 32 | 33 | -------------------------------------------------------------------------------- /tests/expected/martin-cp/no-source_save_config.yaml: -------------------------------------------------------------------------------- 1 | mbtiles: 2 | sources: 3 | world_cities: ./tests/fixtures/mbtiles/world_cities.mbtiles 4 | -------------------------------------------------------------------------------- /tests/expected/martin-cp/no-source_summary.txt: -------------------------------------------------------------------------------- 1 | MBTiles file summary for tests/mbtiles_temp_files/cp_no-source.mbtiles 2 | Schema: flat 3 | Page size: 512B 4 | 5 | Zoom | Count | Smallest | Largest | Average | Bounding Box 6 | 0 | 1 | 1.0KiB | 1.0KiB | 1.0KiB | -180,-85,180,85 7 | 1 | 4 | 160B | 650B | 366B | -180,-85,180,85 8 | 2 | 6 | 137B | 495B | 246B | -90,-67,180,67 9 | 3 | 12 | 67B | 246B | 134B | -45,-41,180,67 10 | 4 | 20 | 65B | 175B | 90B | -23,-22,158,56 11 | 5 | 28 | 65B | 107B | 73B | -11,-11,146,49 12 | 6 | 30 | 64B | 84B | 67B | -6,-6,141,45 13 | all | 101 | 64B | 1.0KiB | 114B | -180,-85,180,85 14 | 15 | -------------------------------------------------------------------------------- /tests/expected/martin-cp/no-source_validate.txt: -------------------------------------------------------------------------------- 1 | [INFO ] Quick integrity check passed for tests/mbtiles_temp_files/cp_no-source.mbtiles 2 | [INFO ] All values in the `tiles` table/view are valid for tests/mbtiles_temp_files/cp_no-source.mbtiles 3 | [INFO ] Skipping per-tile hash validation because this is a flat MBTiles file 4 | -------------------------------------------------------------------------------- /tests/expected/martin-cp/normalized_summary.txt: -------------------------------------------------------------------------------- 1 | MBTiles file summary for tests/mbtiles_temp_files/cp_normalized.mbtiles 2 | Schema: normalized 3 | Page size: 512B 4 | 5 | Zoom | Count | Smallest | Largest | Average | Bounding Box 6 | 0 | 1 | 20.7KiB | 20.7KiB | 20.7KiB | -180,-85,180,85 7 | 1 | 4 | 11.8KiB | 20.6KiB | 16.4KiB | -180,-85,180,85 8 | all | 5 | 11.8KiB | 20.7KiB | 17.2KiB | -180,-85,180,85 9 | 10 | -------------------------------------------------------------------------------- /tests/expected/martin-cp/normalized_validate.txt: -------------------------------------------------------------------------------- 1 | [INFO ] Quick integrity check passed for tests/mbtiles_temp_files/cp_normalized.mbtiles 2 | [INFO ] All values in the `tiles` table/view are valid for tests/mbtiles_temp_files/cp_normalized.mbtiles 3 | [INFO ] All tile hashes are valid for tests/mbtiles_temp_files/cp_normalized.mbtiles 4 | -------------------------------------------------------------------------------- /tests/expected/mbtiles/copy_apply.txt: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/expected/mbtiles/copy_bindiff.txt: -------------------------------------------------------------------------------- 1 | [INFO ] Comparing ./tests/fixtures/mbtiles/world_cities.mbtiles (flat) and ./tests/fixtures/mbtiles/world_cities_modified.mbtiles (flat) into a new file tests/mbtiles_temp_files/world_cities_bindiff.mbtiles (flat) with bin-diff on gzip-ed tiles 2 | [INFO ] Finished processing 1 bindiff tiles 3 | [INFO ] Adding a new metadata value agg_tiles_hash = 0A21AAF2C177B86DA3342A4F65794E49 in tests/mbtiles_temp_files/world_cities_bindiff.mbtiles 4 | -------------------------------------------------------------------------------- /tests/expected/mbtiles/copy_bindiff2.txt: -------------------------------------------------------------------------------- 1 | [INFO ] The patch file tests/mbtiles_temp_files/world_cities_bindiff.mbtiles expects to be applied to a tileset with agg_tiles_hash=84792BF4EE9AEDDC5B1A60E707011FEE, and should result in hash 578FB5BD64746C39E3D344662947FD0D after applying 2 | [INFO ] Applying patch from tests/mbtiles_temp_files/world_cities_bindiff.mbtiles (flat) to ./tests/fixtures/mbtiles/world_cities.mbtiles (flat) into a new file tests/mbtiles_temp_files/world_cities_modified2.mbtiles (flat) with bin-diff on gzip-ed tiles 3 | [INFO ] Finished processing 1 bindiff tiles 4 | [INFO ] Adding a new metadata value agg_tiles_hash = 623863EF20ABEFCB4E30EEFBD82FFFDC in tests/mbtiles_temp_files/world_cities_modified2.mbtiles 5 | [INFO ] Skipping agg_tiles_hash_after_apply validation because re-gzip-ing could produce different tile data. Each bindiff-ed tile was still verified with a hash value 6 | -------------------------------------------------------------------------------- /tests/expected/mbtiles/copy_bindiff3.txt: -------------------------------------------------------------------------------- 1 | [INFO ] Comparing ./tests/fixtures/mbtiles/world_cities_modified.mbtiles (flat) and tests/mbtiles_temp_files/world_cities_modified2.mbtiles (flat) into a new file tests/mbtiles_temp_files/world_cities_bindiff_modified.mbtiles (flat) 2 | [INFO ] Adding a new metadata value agg_tiles_hash = 53A778D4E5E2133B70D4BDE3BADDB82D in tests/mbtiles_temp_files/world_cities_bindiff_modified.mbtiles 3 | -------------------------------------------------------------------------------- /tests/expected/mbtiles/copy_bindiff4.txt: -------------------------------------------------------------------------------- 1 | MBTiles file summary for tests/mbtiles_temp_files/world_cities_bindiff_modified.mbtiles 2 | Schema: flat 3 | File size: 3.00KiB 4 | Page size: 512B 5 | Page count: 6 6 | 7 | Zoom | Count | Smallest | Largest | Average | Bounding Box 8 | 1 | 1 | 495B | 495B | 495B | 0,0,180,85 9 | 10 | -------------------------------------------------------------------------------- /tests/expected/mbtiles/copy_bindiff5.txt: -------------------------------------------------------------------------------- 1 | [INFO ] The patch file ./tests/fixtures/mbtiles/world_cities_bindiff.mbtiles expects to be applied to a tileset with agg_tiles_hash=84792BF4EE9AEDDC5B1A60E707011FEE, and should result in hash 578FB5BD64746C39E3D344662947FD0D after applying 2 | [INFO ] Applying patch from ./tests/fixtures/mbtiles/world_cities_bindiff.mbtiles (flat) to ./tests/fixtures/mbtiles/world_cities.mbtiles (flat) into a new file tests/mbtiles_temp_files/world_cities_modified3.mbtiles (flat) with bin-diff on gzip-ed tiles 3 | [INFO ] Finished processing 1 bindiff tiles 4 | [INFO ] Adding a new metadata value agg_tiles_hash = 623863EF20ABEFCB4E30EEFBD82FFFDC in tests/mbtiles_temp_files/world_cities_modified3.mbtiles 5 | [INFO ] Skipping agg_tiles_hash_after_apply validation because re-gzip-ing could produce different tile data. Each bindiff-ed tile was still verified with a hash value 6 | -------------------------------------------------------------------------------- /tests/expected/mbtiles/copy_bindiff6.txt: -------------------------------------------------------------------------------- 1 | [INFO ] Comparing ./tests/fixtures/mbtiles/world_cities_modified.mbtiles (flat) and tests/mbtiles_temp_files/world_cities_modified3.mbtiles (flat) into a new file tests/mbtiles_temp_files/world_cities_bindiff_modified2.mbtiles (flat) 2 | [INFO ] Adding a new metadata value agg_tiles_hash = 53A778D4E5E2133B70D4BDE3BADDB82D in tests/mbtiles_temp_files/world_cities_bindiff_modified2.mbtiles 3 | -------------------------------------------------------------------------------- /tests/expected/mbtiles/copy_bindiff7.txt: -------------------------------------------------------------------------------- 1 | MBTiles file summary for tests/mbtiles_temp_files/world_cities_bindiff_modified2.mbtiles 2 | Schema: flat 3 | File size: 3.00KiB 4 | Page size: 512B 5 | Page count: 6 6 | 7 | Zoom | Count | Smallest | Largest | Average | Bounding Box 8 | 1 | 1 | 495B | 495B | 495B | 0,0,180,85 9 | 10 | -------------------------------------------------------------------------------- /tests/expected/mbtiles/copy_bindiff_diff.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/mbtiles/copy_bindiff_diff.txt -------------------------------------------------------------------------------- /tests/expected/mbtiles/copy_diff.txt: -------------------------------------------------------------------------------- 1 | [INFO ] Comparing ./tests/fixtures/mbtiles/world_cities.mbtiles (flat) and ./tests/fixtures/mbtiles/world_cities_modified.mbtiles (flat) into a new file tests/mbtiles_temp_files/world_cities_diff.mbtiles (flat) 2 | [INFO ] Adding a new metadata value agg_tiles_hash = C9B90B490DF381D93F8CD8102A469F47 in tests/mbtiles_temp_files/world_cities_diff.mbtiles 3 | -------------------------------------------------------------------------------- /tests/expected/mbtiles/copy_diff2.txt: -------------------------------------------------------------------------------- 1 | [INFO ] Comparing ./tests/fixtures/mbtiles/world_cities_modified.mbtiles (flat) and tests/mbtiles_temp_files/world_cities_copy.mbtiles (flat) into a new file tests/mbtiles_temp_files/world_cities_diff_modified.mbtiles (flat) 2 | [INFO ] Adding a new metadata value agg_tiles_hash = D41D8CD98F00B204E9800998ECF8427E in tests/mbtiles_temp_files/world_cities_diff_modified.mbtiles 3 | -------------------------------------------------------------------------------- /tests/expected/mbtiles/meta-all_help.txt: -------------------------------------------------------------------------------- 1 | Prints all values in the metadata table in a free-style, unstable YAML format 2 | 3 | Usage: mbtiles meta-all 4 | 5 | Arguments: 6 | MBTiles file to read from 7 | 8 | Options: 9 | -h, --help Print help 10 | -------------------------------------------------------------------------------- /tests/expected/mbtiles/meta-get_help.txt: -------------------------------------------------------------------------------- 1 | Gets a single value from the MBTiles metadata table 2 | 3 | Usage: mbtiles meta-get 4 | 5 | Arguments: 6 | MBTiles file to read a value from 7 | Value to read 8 | 9 | Options: 10 | -h, --help Print help 11 | -------------------------------------------------------------------------------- /tests/expected/mbtiles/meta-get_missing_value.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/expected/mbtiles/meta-get_missing_value.txt -------------------------------------------------------------------------------- /tests/expected/mbtiles/meta-get_name.txt: -------------------------------------------------------------------------------- 1 | Major cities from Natural Earth data 2 | -------------------------------------------------------------------------------- /tests/expected/mbtiles/summary.txt: -------------------------------------------------------------------------------- 1 | MBTiles file summary for ./tests/fixtures/mbtiles/world_cities.mbtiles 2 | Schema: flat 3 | File size: 48.00KiB 4 | Page size: 4.00KiB 5 | Page count: 12 6 | 7 | Zoom | Count | Smallest | Largest | Average | Bounding Box 8 | 0 | 1 | 1.0KiB | 1.0KiB | 1.0KiB | -180,-85,180,85 9 | 1 | 4 | 160B | 650B | 366B | -180,-85,180,85 10 | 2 | 7 | 137B | 495B | 239B | -180,-67,180,67 11 | 3 | 17 | 67B | 246B | 134B | -135,-41,180,67 12 | 4 | 38 | 64B | 175B | 86B | -135,-41,180,67 13 | 5 | 57 | 64B | 107B | 72B | -124,-41,180,62 14 | 6 | 72 | 64B | 97B | 68B | -124,-41,180,62 15 | all | 196 | 64B | 1.0KiB | 96B | -180,-85,180,85 16 | 17 | -------------------------------------------------------------------------------- /tests/expected/mbtiles/validate-bad-hash.txt: -------------------------------------------------------------------------------- 1 | [INFO ] Quick integrity check passed for ./tests/fixtures/files/bad_hash.mbtiles 2 | [INFO ] All values in the `tiles` table/view are valid for ./tests/fixtures/files/bad_hash.mbtiles 3 | [INFO ] All tile hashes are valid for ./tests/fixtures/files/bad_hash.mbtiles 4 | [ERROR] Computed aggregate tiles hash D4E1030D57751A0B45A28A71267E46B8 does not match tile data in metadata CAFEC0DEDEADBEEFDEADBEEFDEADBEEF for MBTile file ./tests/fixtures/files/bad_hash.mbtiles 5 | -------------------------------------------------------------------------------- /tests/expected/mbtiles/validate-bad-tiles.txt: -------------------------------------------------------------------------------- 1 | [INFO ] Quick integrity check passed for ./tests/fixtures/files/invalid-tile-idx.mbtiles 2 | [ERROR] At least one tile in the tiles table/view has an invalid value: zoom_level=6, tile_column=10, tile_row=64 in MBTile file ./tests/fixtures/files/invalid-tile-idx.mbtiles 3 | -------------------------------------------------------------------------------- /tests/expected/mbtiles/validate-fix.txt: -------------------------------------------------------------------------------- 1 | [INFO ] Quick integrity check passed for tests/mbtiles_temp_files/fix_bad_hash.mbtiles 2 | [INFO ] All values in the `tiles` table/view are valid for tests/mbtiles_temp_files/fix_bad_hash.mbtiles 3 | [INFO ] All tile hashes are valid for tests/mbtiles_temp_files/fix_bad_hash.mbtiles 4 | [INFO ] Updating agg_tiles_hash from CAFEC0DEDEADBEEFDEADBEEFDEADBEEF to D4E1030D57751A0B45A28A71267E46B8 in tests/mbtiles_temp_files/fix_bad_hash.mbtiles 5 | -------------------------------------------------------------------------------- /tests/expected/mbtiles/validate-fix2.txt: -------------------------------------------------------------------------------- 1 | [INFO ] Quick integrity check passed for tests/mbtiles_temp_files/fix_bad_hash.mbtiles 2 | [INFO ] All values in the `tiles` table/view are valid for tests/mbtiles_temp_files/fix_bad_hash.mbtiles 3 | [INFO ] All tile hashes are valid for tests/mbtiles_temp_files/fix_bad_hash.mbtiles 4 | [INFO ] The agg_tiles_hashes=D4E1030D57751A0B45A28A71267E46B8 has been verified for tests/mbtiles_temp_files/fix_bad_hash.mbtiles 5 | -------------------------------------------------------------------------------- /tests/expected/mbtiles/validate-ok.txt: -------------------------------------------------------------------------------- 1 | [INFO ] Quick integrity check passed for ./tests/fixtures/mbtiles/zoomed_world_cities.mbtiles 2 | [INFO ] All values in the `tiles` table/view are valid for ./tests/fixtures/mbtiles/zoomed_world_cities.mbtiles 3 | [INFO ] All tile hashes are valid for ./tests/fixtures/mbtiles/zoomed_world_cities.mbtiles 4 | [INFO ] The agg_tiles_hashes=D4E1030D57751A0B45A28A71267E46B8 has been verified for ./tests/fixtures/mbtiles/zoomed_world_cities.mbtiles 5 | -------------------------------------------------------------------------------- /tests/fixtures/cog/expected/all_transprent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/fixtures/cog/expected/all_transprent.png -------------------------------------------------------------------------------- /tests/fixtures/cog/expected/down_padded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/fixtures/cog/expected/down_padded.png -------------------------------------------------------------------------------- /tests/fixtures/cog/expected/down_padded_with_alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/fixtures/cog/expected/down_padded_with_alpha.png -------------------------------------------------------------------------------- /tests/fixtures/cog/expected/not_padded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/fixtures/cog/expected/not_padded.png -------------------------------------------------------------------------------- /tests/fixtures/cog/expected/right_padded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/fixtures/cog/expected/right_padded.png -------------------------------------------------------------------------------- /tests/fixtures/cog/expected/right_padded_with_alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/fixtures/cog/expected/right_padded_with_alpha.png -------------------------------------------------------------------------------- /tests/fixtures/cog/rgb_u8.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/fixtures/cog/rgb_u8.tif -------------------------------------------------------------------------------- /tests/fixtures/cog/rgba_u8.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/fixtures/cog/rgba_u8.tif -------------------------------------------------------------------------------- /tests/fixtures/cog/rgba_u8_nodata.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/fixtures/cog/rgba_u8_nodata.tiff -------------------------------------------------------------------------------- /tests/fixtures/files/bad_hash.mbtiles: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/fixtures/files/bad_hash.mbtiles -------------------------------------------------------------------------------- /tests/fixtures/files/invalid-tile-format.mbtiles: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/fixtures/files/invalid-tile-format.mbtiles -------------------------------------------------------------------------------- /tests/fixtures/files/invalid-tile-idx.mbtiles: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/fixtures/files/invalid-tile-idx.mbtiles -------------------------------------------------------------------------------- /tests/fixtures/files/invalid_zoomed_world_cities.mbtiles: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/fixtures/files/invalid_zoomed_world_cities.mbtiles -------------------------------------------------------------------------------- /tests/fixtures/files/tmp.json: -------------------------------------------------------------------------------- 1 | {"foo":"bar"} 2 | -------------------------------------------------------------------------------- /tests/fixtures/fonts/overpass-mono-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/fixtures/fonts/overpass-mono-regular.ttf -------------------------------------------------------------------------------- /tests/fixtures/fonts/sub_dir/overpass-mono-light.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/fixtures/fonts/sub_dir/overpass-mono-light.otf -------------------------------------------------------------------------------- /tests/fixtures/functions/function_null.sql: -------------------------------------------------------------------------------- 1 | DROP FUNCTION IF EXISTS public.function_null; 2 | 3 | CREATE OR REPLACE FUNCTION public.function_null( 4 | z integer, x integer, y integer 5 | ) RETURNS bytea AS $$ 6 | BEGIN 7 | RETURN null; 8 | END 9 | $$ LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE; 10 | -------------------------------------------------------------------------------- /tests/fixtures/functions/function_null_row.sql: -------------------------------------------------------------------------------- 1 | DROP FUNCTION IF EXISTS public.function_null_row; 2 | 3 | CREATE OR REPLACE FUNCTION public.function_null_row( 4 | z integer, x integer, y integer 5 | ) 6 | RETURNS TABLE (mvt bytea, key text) AS $$ 7 | SELECT NULL::bytea, NULL::text 8 | $$ LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE; 9 | -------------------------------------------------------------------------------- /tests/fixtures/functions/function_null_row2.sql: -------------------------------------------------------------------------------- 1 | DROP FUNCTION IF EXISTS public.function_null_row2; 2 | 3 | CREATE OR REPLACE FUNCTION public.function_null_row2( 4 | z integer, x integer, y integer 5 | ) 6 | RETURNS TABLE (mvt bytea, key text) AS $$ 7 | SELECT NULL::bytea, NULL::text WHERE FALSE; 8 | $$ LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE; 9 | -------------------------------------------------------------------------------- /tests/fixtures/functions/function_zoom_xy.sql: -------------------------------------------------------------------------------- 1 | DROP FUNCTION IF EXISTS public.function_zoom_xy; 2 | 3 | CREATE OR REPLACE FUNCTION public.function_zoom_xy( 4 | zoom integer, x integer, y integer 5 | ) RETURNS bytea AS $$ 6 | DECLARE 7 | mvt bytea; 8 | BEGIN 9 | SELECT INTO mvt ST_AsMVT(tile, 'public.function_zoom_xy', 4096, 'geom') FROM ( 10 | SELECT 11 | ST_AsMVTGeom(ST_Transform(ST_CurveToLine(geom), 3857), ST_TileEnvelope(zoom, x, y), 4096, 64, true) AS geom 12 | FROM public.table_source 13 | WHERE geom && ST_Transform(ST_TileEnvelope(zoom, x, y), 4326) 14 | ) as tile WHERE geom IS NOT NULL; 15 | 16 | RETURN mvt; 17 | END 18 | $$ LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE; 19 | -------------------------------------------------------------------------------- /tests/fixtures/functions/function_zxy.sql: -------------------------------------------------------------------------------- 1 | DROP FUNCTION IF EXISTS public.function_zxy; 2 | 3 | CREATE OR REPLACE FUNCTION public.function_zxy( 4 | z integer, x integer, y integer 5 | ) RETURNS bytea AS $$ 6 | DECLARE 7 | mvt bytea; 8 | BEGIN 9 | SELECT INTO mvt ST_AsMVT(tile, 'public.function_zxy', 4096, 'geom') FROM ( 10 | SELECT 11 | ST_AsMVTGeom(ST_Transform(ST_CurveToLine(geom), 3857), ST_TileEnvelope(z, x, y), 4096, 64, true) AS geom 12 | FROM public.table_source 13 | WHERE geom && ST_Transform(ST_TileEnvelope(z, x, y), 4326) 14 | ) as tile WHERE geom IS NOT NULL; 15 | 16 | RETURN mvt; 17 | END 18 | $$ LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE; 19 | -------------------------------------------------------------------------------- /tests/fixtures/functions/function_zxy2.sql: -------------------------------------------------------------------------------- 1 | DROP FUNCTION IF EXISTS public.function_zxy2; 2 | 3 | CREATE OR REPLACE FUNCTION public.function_zxy2( 4 | z integer, x integer, y integer 5 | ) RETURNS bytea AS $$ 6 | SELECT ST_AsMVT(tile, 'public.function_zxy2', 4096, 'geom') FROM ( 7 | SELECT 8 | ST_AsMVTGeom(ST_Transform(ST_CurveToLine(geom), 3857), ST_TileEnvelope(z, x, y), 4096, 64, true) AS geom 9 | FROM public.table_source 10 | WHERE geom && ST_Transform(ST_TileEnvelope(z, x, y), 4326) 11 | ) as tile WHERE geom IS NOT NULL 12 | $$ LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE; 13 | -------------------------------------------------------------------------------- /tests/fixtures/functions/function_zxy_query_jsonb.sql: -------------------------------------------------------------------------------- 1 | DROP FUNCTION IF EXISTS public.function_zxy_query_jsonb; 2 | 3 | CREATE OR REPLACE FUNCTION public.function_zxy_query_jsonb( 4 | z integer, x integer, y integer, query jsonb 5 | ) RETURNS bytea AS $$ 6 | DECLARE 7 | mvt bytea; 8 | BEGIN 9 | RAISE DEBUG 'function got query: %', query; 10 | 11 | SELECT INTO mvt ST_AsMVT(tile, 'public.function_zxy_query_jsonb', 4096, 'geom') FROM ( 12 | SELECT 13 | ST_AsMVTGeom(ST_Transform(ST_CurveToLine(geom), 3857), ST_TileEnvelope(z, x, y), 4096, 64, true) AS geom 14 | FROM public.table_source 15 | WHERE geom && ST_Transform(ST_TileEnvelope(z, x, y), 4326) 16 | ) as tile WHERE geom IS NOT NULL; 17 | 18 | RETURN mvt; 19 | END 20 | $$ LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE; 21 | -------------------------------------------------------------------------------- /tests/fixtures/functions/function_zxy_query_test.sql: -------------------------------------------------------------------------------- 1 | DROP FUNCTION IF EXISTS public.function_zxy_query_test; 2 | 3 | CREATE OR REPLACE FUNCTION public.function_zxy_query_test( 4 | z integer, x integer, y integer, query_params json 5 | ) RETURNS bytea AS $$ 6 | DECLARE 7 | mvt bytea; 8 | BEGIN 9 | RAISE DEBUG 'function got query_params: %', query_params; 10 | 11 | IF (query_params->>'token')::varchar IS NULL THEN 12 | RAISE EXCEPTION 'the `token` json parameter does not exist in `query_params`'; 13 | END IF; 14 | 15 | SELECT INTO mvt ST_AsMVT(tile, 'public.function_zxy_query_test', 4096, 'geom') FROM ( 16 | SELECT 17 | ST_AsMVTGeom(ST_Transform(ST_CurveToLine(geom), 3857), ST_TileEnvelope(z, x, y), 4096, 64, true) AS geom 18 | FROM public.table_source 19 | WHERE geom && ST_Transform(ST_TileEnvelope(z, x, y), 4326) 20 | ) as tile WHERE geom IS NOT NULL; 21 | 22 | RETURN mvt; 23 | END 24 | $$ LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE; 25 | -------------------------------------------------------------------------------- /tests/fixtures/functions/function_zxy_row.sql: -------------------------------------------------------------------------------- 1 | -- Uses mixed case names but without double quotes 2 | 3 | DROP FUNCTION IF EXISTS public.function_zxy_row; 4 | 5 | CREATE OR REPLACE FUNCTION public.function_zxy_ROW( 6 | Z integer, x integer, y integer 7 | ) 8 | RETURNS TABLE (mvt bytea) AS $$ 9 | SELECT ST_AsMVT(tile, 'public.function_zxy_ROW', 4096, 'geom') as MVT FROM ( 10 | SELECT 11 | ST_AsMVTGeom(ST_Transform(ST_CurveToLine(geom), 3857), ST_TileEnvelope(Z, x, y), 4096, 64, true) AS geom 12 | FROM public.table_source 13 | WHERE geom && ST_Transform(ST_TileEnvelope(Z, x, y), 4326) 14 | ) as tile WHERE geom IS NOT NULL 15 | $$ LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE; 16 | -------------------------------------------------------------------------------- /tests/fixtures/functions/function_zxy_row_key.sql: -------------------------------------------------------------------------------- 1 | DROP FUNCTION IF EXISTS public.function_zxy_row_key; 2 | 3 | CREATE OR REPLACE FUNCTION public.function_zxy_row_key( 4 | z integer, x integer, y integer 5 | ) 6 | RETURNS TABLE (mvt bytea, key text) AS $$ 7 | SELECT mvt, md5(mvt) as key FROM ( 8 | SELECT ST_AsMVT(tile, 'public.function_zxy_row_key', 4096, 'geom') as mvt FROM ( 9 | SELECT 10 | ST_AsMVTGeom(ST_Transform(ST_CurveToLine(geom), 3857), ST_TileEnvelope(z, x, y), 4096, 64, true) AS geom 11 | FROM public.table_source 12 | WHERE geom && ST_Transform(ST_TileEnvelope(z, x, y), 4326) 13 | ) as tile WHERE geom IS NOT NULL) src 14 | $$ LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE; 15 | -------------------------------------------------------------------------------- /tests/fixtures/initdb-dc-ssl-cert.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | set -e 3 | 4 | mv /var/lib/postgresql/data/pg_hba.conf /var/lib/postgresql/data/pg_hba.conf.bak 5 | cat > /var/lib/postgresql/data/pg_hba.conf < /var/lib/postgresql/data/pg_hba.conf < 2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/fixtures/sprites/src1/sub/circle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/fixtures/tables/points_empty.sql: -------------------------------------------------------------------------------- 1 | -- This table is intentionally left empty 2 | CREATE TABLE points_empty 3 | ( 4 | gid SERIAL PRIMARY KEY, 5 | geom GEOMETRY 6 | ); 7 | 8 | CREATE INDEX ON points_empty USING gist (geom); 9 | CLUSTER points_empty_geom_idx ON points_empty; 10 | -------------------------------------------------------------------------------- /tests/fixtures/vtzero-check: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/fixtures/vtzero-check -------------------------------------------------------------------------------- /tests/fixtures/vtzero-show: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplibre/martin/296c22196bd72f211e8a6eea5d2e65428f286327/tests/fixtures/vtzero-show --------------------------------------------------------------------------------