Global Mapper v25.0

Not able to find the right syntax to downloa a hiking map from a webpage

Hi, I'm struggling to write the correct syntax to download imagery from an online source. It's a very good hiking map and it's located at: www.caimontilattari.it
The map appears to be a layer on top of Google Maps and the related tiles are stored under http://www.caimontilattari.it/caimap/ and subsequent folders.
Can anybody give me a hand, please?

Thank you
Mike

Answers

  • Ice Age Mark
    Ice Age Mark Global Mapper User Trusted User
    Answer ✓


    Hello again Mike,

    The syntax is: https://www.caimontilattari.it/caimap/Zoom level/X tile #/Y tile #.jpg

    Unfortunately, that's where the simplicity ends.  The map is an interactive tiled web map, so it is being created "on the fly" as you zoom and/or pan, in a manner similar to how Global Mapper's "Map Catalog" function works.  Each time you zoom/pan the website creates URL's for only the tiles necessary to complete that view (with some caching).  When you zoom and still get that nice crisp clear unpixelated image, it isn't "magnifying" as you might imagine, it's creating a new image from a different higher resolution tile set.  (Notice it takes a small time to display each time.)  

    The syntax is the same as the "slippy tile" format that the background map (and Google Earth, OSM, etc.) tiles use.  It is "...caimap/" is followed by a zoom level, which then determines an X and Y tile number for the tile by use of a formula.  I put the formulas below if you want to try it.  So, for example you would use "...caimap/Z15/17687/12317.jpg" for the upper leftmost tile at zoom level 15.

    The problem is the number of tiles you need for the whole map at the resolution I think you're expecting.  This map has a max zoom of 16, but only tiles above zoom 14 will likely be suitable.  Here is the X/Y tile # range and number of tiles in the map for Zoom levels 13-15:

    Zoom 13   (4421-4430), (3079-3083), 36 tiles
    Zoom 14   (8843-8861), 6158-6167), 162 tiles
    Zoom 15   (17687-17723), (12317-12337), 720 tiles

    The 36 Zoom level 13 tiles will create a map image 2304 x 1024 pixels, but it won't be crisp upon zooming anymore (like the web map), it will rapidly pixelate.  I attached a tile of each zoom level, so you can look for yourself at the resolution.  To me, level 13 is worthless, and even level 14 looked fuzzy at it's native size.  Level 15 looks really good, but as you can see, that introduces the next problem - how to mosaic 720 un-georeferenced images.  Even 36 is a formidable task.  (Irfanview might do it.)  But alas, at Zoom 13 resolution is out the window.

    So, the short of it all is that it can be done (and georeferenced too), but it's likely not worth the trouble for your needs.  If you had some small area(s) of the map you really wanted, you can use the formulas and extract an area of Z15 tiles; but it took 72 tiles just to make an area about 3.5 miles per side at Zoom 15.

    "You can't always get what you want"

    If you want to proceed in some way or have other questions, let me know.

    Best regards,

    Mark

    Formulas:

    Lat/Long (decimal degrees) to X/Y tile #'s

    n = 2 ^ zoom
    xtile = n * ((lon_deg + 180) / 360)
    ytile = n * (1 - (log(tan(lat_rad) + sec(lat_rad)) / π)) / 2

    X/Y tile #'s to Lat/long

    n = 2 ^ zoom
    lon_deg = xtile / n * 360.0 - 180.0
    lat_rad = arctan(sinh(π * (1 - 2 * ytile / n)))
    lat_deg = lat_rad * 180.0 / π
    (To automate these, you can find Python [and other] code here: https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Python)



          
  • Alpamayo
    Alpamayo Global Mapper User
    Thank you Mark for your excellent explanation and for your expertise. Of course I had realized the map had different zoom levels and that magnification was not involved but rather the use of a different map set. Of course I would be interested only in the most detailed one and naively had thought I could put together the entire (most detailed) map from the Z16 folder with Global Mapper and save it in ecw format (for a later import into OziExplorer - georeferencing would not be an issue). But at this point the problem seems putting together a mosaic of hundreds of tiles - ungeoreferenced tiles! You are right, it's not worth the trouble (it would be easier and faster using adjacent screenshots of a full screen view from my pc, overlapping each tile a little and let Photoshop reassemble the map). 

    Thanks again for your time and wisdom.

    Mike