Calculate an antimeridian-adjusted bounding box in tileset metadata (#82)

* Calculate a new antimeridian-adjusted bounding box

* Add antimeridian bounding box to pmtiles, dirtiles, and tile-join

* Don't take out-of-bounds latitudes into account in the adjusted bbox

* Update changelog

* Forgot to adjust tests after the last change
This commit is contained in:
Erica Fischer
2023-03-09 20:26:48 -08:00
committed by GitHub
parent 329dd86bfd
commit afc7ca01a2
195 changed files with 297 additions and 13 deletions
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "45.000000,33.256630,2",
"description": "tests/ne_110m_admin_0_countries/out/--coalesce_-z2_-Ccat.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "16.875000,44.951199,5",
"description": "tests/ne_110m_admin_0_countries/out/-R5%17%11.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "16.875000,44.951199,5",
"description": "tests/ne_110m_admin_0_countries/out/-ae_-zg_-M5000_--drop-densest-as-needed.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "16.875000,44.951199,5",
"description": "tests/ne_110m_admin_0_countries/out/-ae_-zg_-M5000_--drop-fraction-as-needed.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "16.875000,44.951199,5",
"description": "tests/ne_110m_admin_0_countries/out/-ae_-zg_-M5000_--drop-smallest-as-needed.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "16.875000,44.951199,5",
"description": "tests/ne_110m_admin_0_countries/out/-ae_-zg_-M5000_--force-feature-limit.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-110.039063,26.980829,-92.021484,51.998410",
"center": "-92.021484,26.980829,0",
"description": "tests/ne_110m_admin_0_countries/out/-z0_--clip-bounding-box_-110,27,-92,52.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "0.000000,0.000000,0",
"description": "tests/ne_110m_admin_0_countries/out/-z0_--order-largest-first.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "0.000000,0.000000,0",
"description": "tests/ne_110m_admin_0_countries/out/-z0_--order-smallest-first.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "0.000000,0.000000,0",
"description": "tests/ne_110m_admin_0_countries/out/-z0_--tiny-polygon-size_100.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "0.000000,0.000000,0",
"description": "tests/ne_110m_admin_0_countries/out/-z0_--tiny-polygon-size_50_--order-largest-first.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "0.000000,0.000000,0",
"description": "tests/ne_110m_admin_0_countries/out/-z0_--tiny-polygon-size_50_--simplification_50.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "45.000000,33.256630,2",
"description": "tests/ne_110m_admin_0_countries/out/-z2_--convert-polygons-to-label-points.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "22.500000,20.489949,3",
"description": "tests/ne_110m_admin_0_countries/out/-z3_-ai.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "11.250000,48.378236,4",
"description": "tests/ne_110m_admin_0_countries/out/-z4_-yname.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "11.250000,48.378236,4",
"description": "tests/ne_110m_admin_0_countries/out/-z4_-yname_--drop-polygons.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "11.250000,48.378236,4",
"description": "tests/ne_110m_admin_0_countries/out/-z4_-yname_--grid-low-zooms_-D8.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "11.250000,48.378236,4",
"description": "tests/ne_110m_admin_0_countries/out/-z4_-yname_--no-tiny-polygon-reduction.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "11.250000,48.378236,4",
"description": "tests/ne_110m_admin_0_countries/out/-z4_-yname_-S4.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "11.250000,48.378236,4",
"description": "tests/ne_110m_admin_0_countries/out/-z4_-yname_-S4_--simplification-at-maximum-zoom_2.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "11.250000,48.378236,4",
"description": "tests/ne_110m_admin_0_countries/out/-z4_-yname_-S4_--visvalingam.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "-101.250000,70.266402,4",
"description": "tests/ne_110m_admin_0_countries/out/-z4_-yname_-pD.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "11.250000,48.378236,4",
"description": "tests/ne_110m_admin_0_countries/out/-z4_-yname_-pc.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "16.875000,44.951199,5",
"description": "tests/ne_110m_admin_0_countries/out/-z5_-M5000_--coalesce-densest-as-needed.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "16.875000,44.951199,5",
"description": "tests/ne_110m_admin_0_countries/out/-z5_-M5000_--coalesce-fraction-as-needed.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "16.875000,44.951199,5",
"description": "tests/ne_110m_admin_0_countries/out/-z5_-M5000_--coalesce-smallest-as-needed.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "16.875000,44.951199,5",
"description": "tests/ne_110m_admin_0_countries/out/-z5_-M5000_--drop-smallest-as-needed.json.check.mbtiles",
@@ -1,4 +1,5 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
"center": "0.000000,0.000000,0",
"description": "tests/ne_110m_admin_0_countries/out/-zg_-yname.json.check.mbtiles",