Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please clarify the use of osm_size within the code base. [& discussion of init.json browser viewport, centered on lat/long + zoom-level] #60

Open
jvonau opened this issue May 2, 2022 · 8 comments

Comments

@jvonau
Copy link
Contributor

jvonau commented May 2, 2022

https://github.com/iiab/maps/blob/master/2020/map-catalog.json no osm_size has 2020 entries
https://github.com/iiab/iiab-admin-console/blob/master/roles/common/files/map/adm-map-catalog.json no osm_size has 2020
What is the significance of "seq" below and these 2 versions are so close could they be unified going forward?

jvonau@kickass:/mnt/scratch$ diff -u git/maps/2020/map-catalog.json git/iiab-admin-console/roles/common/files/map/adm-map-catalog.json
--- git/maps/2020/map-catalog.json	2022-04-28 18:15:48.174567668 -0500
+++ git/iiab-admin-console/roles/common/files/map/adm-map-catalog.json	2022-05-01 22:46:18.563206181 -0500
@@ -13,10 +13,10 @@
       "perma_ref": "",
       "publish": "False",
       "region": "planet_base",
-      "seq": 50,
+      "seq": 1,
       "size": 2108256256,
       "south": "-84.0",
-      "title": "Planet Base",
+      "title": "Planet to Zoom 10",
       "version": "",
       "west": "0.0",
       "zoom": "0",
@@ -35,10 +35,10 @@
       "perma_ref": "",
       "publish": "False",
       "region": "satellite_base",
-      "seq": 0,
+      "seq": 2,
       "size": 1273274368,
       "south": "0.0",
-      "title": "Satellite Base",
+      "title": "Satellite to Zoom 9",
       "version": "v3",
       "west": "0.0",
       "zoom": "0",
@@ -216,7 +216,7 @@
       "seq": 95,
       "size": 86868115456,
       "south": "-84",
-      "title": "World",
+      "title": "Entire World",
       "version": "v0.2",
       "west": "-180",
       "zoom": "2",
@@ -235,10 +235,10 @@
       "perma_ref": "en-osm-omt_san_jose",
       "publish": "True",
       "region": "san_jose",
-      "seq": 5,
+      "seq": 105,
       "size": 30449664,
       "south": "37.23",
-      "title": "World to Zoom Level 10",
+      "title": "San Jose Small File for Testing",
       "version": "v0.21",
       "west": "-122.24",
       "zoom": "2",
@@ -311,4 +311,4 @@
       "filename": "osm_spanish_speaking_regions_z11-z14_2020.mbtiles"
     }
   }
-}
\ No newline at end of file
+}

http://download.iiab.io/content/OSM/vector-tiles/map-catalog.json has osm_size has 2019 entries
https://github.com/iiab/maps/blob/master/osm-source/jupyter-code/README.md
I get the impression that osm_size is going/gone away and just using 'size' 'mbtile_size' only now in map-catalog.json?
These tools mention osm_size:
https://github.com/iiab/maps/blob/master/osm-source/jupyter-code/maps.ipynb has 4 mentions of osm_size, one within what looks to be a python traceback.
https://github.com/iiab/maptools/search?q=osm_size
Other mentions of osm_size https://github.com/iiab/maps/search?&q=osm_size

@jvonau
Copy link
Contributor Author

jvonau commented May 2, 2022

The last remaining small issue is this noted error

XHRGET http://192.168.122.35/osm-vector-maps/viewer/init.json [HTTP/1.1 404 Not Found 0ms]

This file does exist in iiab but is not installed.

@holta
Copy link
Member

holta commented May 2, 2022

The last remaining small issue is this noted error

XHRGET http://192.168.122.35/osm-vector-maps/viewer/init.json [HTTP/1.1 404 Not Found 0ms]

This file does exist in iiab but is not installed.

That looks like the lat/long viewport, so browsers showcase the most recently installed continent/region (centering & framing its green rectangle within your browser) e.g. whenever a new person visits http://box/maps

So init.json is probably intended to be missing on fresh IIAB software installs — until a continent/region is installed — sounds like everything is probably working fine (or am I wrong?)

@holta
Copy link
Member

holta commented May 2, 2022

General context, just in case others run into this ticket — and want to learn a bit more about IIAB's map catalog(s) — that currently contain info about 14 .mbtiles files for world continents and similar regions:

https://github.com/iiab/iiab/wiki/IIAB-Maps#how-do-i-upgrade-an-iiab-map-pack

Most of these are OpenStreetMap (OSM) vector map files, but there is one exception at the moment — i.e. the 1.2 GB satellite_z0-z9_2020.mbtiles is also included in the catalog(s).

Just FYI current file sizes are here:

@jvonau
Copy link
Contributor Author

jvonau commented May 2, 2022

The last remaining small issue is this noted error

XHRGET http://192.168.122.35/osm-vector-maps/viewer/init.json [HTTP/1.1 404 Not Found 0ms]

This file does exist in iiab but is not installed.

That looks like the lat/long viewport, so browsers showcase the most recently installed continent/region (centering & framing its green rectangle within your browser) e.g. whenever a new person visits http://box/maps

Yes, it is used for custom focus when you visit the page with the contents below the map will roughly center on Winnipeg with a zoom of 8

{
  "region" : "min",
  "center_lat" : "50.00",
  "center_lon" : "-96.00",
  "zoom" : "8"
}

So init.json is probably intended to be missing on fresh IIAB software installs — until a continent/region is installed — sounds like everything is probably working fine (or am I wrong?)

Installed the base map set and this file does not exist, should it? or maybe as a init.json.example to use as a guide? The ability gained by it's presents is a great customization, any plans to add editable lat lon and zoom fields for init.json to admin-console?

@tim-moody
Copy link

Installed the base map set and this file does not exist, should it?

This issue has 3 or 4 distinct items. Is this the last standing one? init.json is created when a maptile set is added so as to put focus on its region. It's true that a dummy could be installed that would put focus on the center of the world if someone cares to say what that is. I think the current code does that in the absence of the file.

@holta holta changed the title Please clarify the use of osm_size within the code base. Please clarify the use of osm_size within the code base. [& discussion of init.json browser viewport, centered on lat/long + zoom-level] May 2, 2022
@jvonau
Copy link
Contributor Author

jvonau commented May 2, 2022

Ok init.json shows up once one of the z11+ mbtiles are installed, still would be nice to be able to tweak the focus at some point later. Is there a hint to this ability? I might of glossed over it in the docs..

@holta
Copy link
Member

holta commented May 2, 2022

Ok init.json shows up once one of the z11+ mbtiles are installed, still would be nice to be able to tweak the focus at some point later. Is there a hint to this ability? I might of glossed over it in the docs..

This is a good idea.

I've started a Customizations section here:

https://github.com/iiab/iiab/wiki/IIAB-Maps#customizations

@holta
Copy link
Member

holta commented May 2, 2022

I've started a Customizations section here:

https://github.com/iiab/iiab/wiki/IIAB-Maps#customizations

Above Customizations expanded.

Pointing implementers in the right direction to modify the green rectangles (for continents/regions) and yellow squares (for satellite photos) e.g. if they need to fine-tune those colors to show suitable contrast against the vegetation (or lack thereof) in their part of the world.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants