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

Mods for new Maps #340

Open
13 of 17 tasks
tim-moody opened this issue Sep 16, 2020 · 15 comments
Open
13 of 17 tasks

Mods for new Maps #340

tim-moody opened this issue Sep 16, 2020 · 15 comments
Assignees

Comments

@tim-moody
Copy link
Contributor

tim-moody commented Sep 16, 2020

Backend

  • Add backend for iiab-install-map-region
  • Handle Base mbtiles for maps and satellite
  • Add backend for iiab-extend-sat.py
  • Add backend for Get OSM WiP for estimated space calcs
  • Add backend for wikidata overlays
  • Add backend for osm version
  • Need to run /usr/bin/iiab-maps-finish.py after downloads
  • Add backend to install base world map and base satellite mbtiles

Space Estimate

  • ? do space calc when adding job so can just read it in add_wip and remove_wip

Front End Phase I

  • No changes to UI or space calcs, just use new catalog and new back end
  • Read cmdsrv config to get map version

Front End Phase II

  • Read cmdsrv config to get map version
  • Fork Admin Console page from maps if not already done
  • Enforce single selection for mbtile sets (why not allow multiple selections?) - NO
  • Disable selection for already installed
  • Add buttons where cli syntax is
  • Add ajax calls to backend for each function
  • Get WiP space stats
  • Add action for refresh mbtile sets catalog - NO This is deferred while catalog static
  • Add action to get base map and satellite mbtiles
  • Add new top level menu for maps - NO Keeping in current as only 2 menu items.
  • Add help sections

Source for backend:

  • /usr/bin/iiab-install-map-region does download of tiles and also satellite
  • /usr/bin/iiab-maps-finish.py calcs various data structures (initial coordinates and updated vector_map_idx
  • /usr/bin/iiab-extend-sat.py

Where are the constants for:

#1. https://github.com/iiab/maps/blob/master/osm-source/pages/viewer/scripts/iiab-install-map-region L4-10 and
#2,3. https://github.com/iiab/maps/blob/master/osm-source/pages/viewer/scripts/iiab-extend-sat.py L44-46

source_url=https://archive.org/download
SATELLITE=satellite_z0-z9_v3.mbtiles
working_dir=/library/working/maps
PLANET=osm-planet_z0-z10_2019.mbtiles
SAN_JOSE=osm_san_jose_z11-z14_2019.mbtiles
PREVIEW_SAT=satellite_z0-z6_v3.mbtiles
PREVIEW_OSM=planet_z0-z6_2019.mbtiles
work_dir = '/library/working/maps'
osm_dir = '/library/www/osm-vector-maps/maplist/assets'
sat_dir = '/library/www/osm-vector-maps/viewer/tiles'

Logic:

  • remove preview files in osm-vect_v2_install_step3.sh if exist
  • inst-map-tiles, allow override of download url to handle satellite, which is not in catalog

Code in #351 and #352

@tim-moody
Copy link
Contributor Author

tim-moody commented Sep 17, 2020

Source for backend:

  • /usr/bin/iiab-install-map-region does download of tiles and also satellite
  • /usr/bin/iiab-maps-finish.py calcs various data structures (initial coordinates and updated vector_map_idx
  • /usr/bin/iiab-extend-sat.py

Where are the constants for:

@tim-moody
Copy link
Contributor Author

@georgejhunt I notice that iiab-install-map-region computes the source url rather than reading from catalog. Looks like I should get the url from detail_url

What will happen to the catalog if there is an osm_central_america_z11-z14_202X.mbtiles? will osm_central_america_z11-z14_2019.mbtiles remain or be replaced?

@tim-moody
Copy link
Contributor Author

@georgejhunt can I take the existence of /library/www/osm-vector-maps/installer/ as an indication that we have the new version of maps. I want to leave backwards compatibility, at least for now.

@georgejhunt
Copy link
Contributor

georgejhunt commented Sep 17, 2020 via email

@tim-moody
Copy link
Contributor Author

tim-moody commented Sep 17, 2020

The current code uses url not detailed_url. Do they differ to provide backwards compatibility?

@georgejhunt
Copy link
Contributor

georgejhunt commented Sep 17, 2020 via email

@tim-moody
Copy link
Contributor Author

@georgejhunt I'm getting confused again. What is the relationship between map-catalog.json, regions.json, and vector-map-idx.json? Is only map-catalog.json used in the current code?

/etc/iiab/map-catalog.json:

{
  "maps": {
    "osm_africa_z11-z14_2019.mbtiles": {
      "bittorrent_url": "https://archive.org/download/osm_africa_z11-z14_2019.mbtiles/osm_africa_z11-z14_2019.mbtiles_archive.torrent",
      "center_lat": "2.0",
      "center_lon": "20.0",
      "date": "2019-10-08",
      "detail_url": "https://archive.org/download/osm_africa_z11-z14_2019.mbtiles/osm_africa_z11-z14_2019.mbtiles",

/etc/iiab/regions.json:

{
  "regions": {
    "africa": {
      "center_lat": "2.0",
      "center_lon": "20.0",
      "date": "2017-07-03",
      "east": "63.56",
      "north": "46.00",
      "osm_size": "10099986432",
      "perma_ref": "en-osm-omt_africa",
      "sat_is_regional": "False",
      "sat_size": "976416768",
      "sat_url": "https://archive.org/download/satellite_z0-z9_v3.mbtiles/satellite_z0-z9_v3.mbtiles",
      "seq": 50,
      "size": "11076403200",
      "south": "-84.0",
      "title": "Africa",
      "url": "https://archive.org/download/en-osm-omt_africa_2017-07-03_v0.23/en-osm-omt_africa_2017-07-03_v0.23.zip",
 

/library/www/html/common/assets/vector-map-idx.json:

{
  "en-osm-omt_south_asia": {
    "file_name": "osm_south_asia_z11-z14_2019.mbtiles",
    "menu_item": "en-osm-omt_south_asia",
    "size": 14300418048,
    "date": "2019-10-08",
    "region": "south_asia",
    "language": "en"
  },
  "en-osm-omt_san_jose": {
    "file_name": "osm_san_jose_z11-z14_2019.mbtiles",
    "menu_item": "en-osm-omt_san_jose",
    "size": 2867826688,
    "date": "2019-10-08",
    "region": "san_jose",
    "language": "en"
  }
}

@georgejhunt
Copy link
Contributor

georgejhunt commented Sep 25, 2020 via email

@tim-moody
Copy link
Contributor Author

tim-moody commented Sep 25, 2020

@georgejhunt I got Failed to open /library/www/osm-vector-maps/viewer/tiles/satellite_z0-z9_v3.mbtiles -- Quitting

I have in /library/www/osm-vector-maps/viewer/tiles/
-rw-r--r-- 1 root root 35438592 Aug 22 18:42 planet_z0-z6_2019.mbtiles
-rw-r--r-- 1 root root 1810432 Aug 22 18:39 satellite_z0-z4_v3.mbtiles

I assume this is because the install was short circuited to save time.
What is the operation to get a full set of world and satellite tiles?

iiab-install-map-region with no arguments?

@georgejhunt
Copy link
Contributor

georgejhunt commented Sep 25, 2020 via email

@tim-moody
Copy link
Contributor Author

I thinks this was changed in iiab/iiab@809de60#diff-a3c03d404704b5bd901f6e04df80ef64

Now I think we need a button or something to do the initial download.

@tim-moody
Copy link
Contributor Author

@georgejhunt can you help me get the output of iiab-extend-sat.py to stdout so it gets into the job status?

@tim-moody
Copy link
Contributor Author

could just be buffering as the output appeared when it finished.

"job_output": "tileX:6303 tileY:3699 zoom:13 alredy downloaded: 0 added:690\ntileX:6303 tileY:3709 zoom:13 alredy downloaded: 0 added:700\ntileX:6304 tileY:3696 zoom:13 alredy downloaded: 0 added:710\ntileX:6304 tileY:3706 zoom:13 alredy downloaded: 0 added:720\ntileX:6305 tileY:3693 zoom:13 alredy downloaded: 0 added:730\ntileX:6305 tileY:3703 zoom:13 alredy downloaded: 0 added:740\ntileX:6306 tileY:3690 zoom:13 alredy downloaded: 0 added:750\ntileX:6306 tileY:3700 zoom:13 alredy downloaded: 0 added:760\ntileX:6306 tileY:3710 zoom:13 alredy downloaded: 0 added:770\nTotal time: 0 hrs: 3 min: 0 sec Duplicates:0 Total_tiles Added:773\n"

@holta

This comment has been minimized.

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