Ask questions and learn!

Quad Key?

Some map providers are using "Quad Key" instead of XYZ.

For example, Bing does this.

If I want to make a Custom Map URL for a provider that uses Quad Key, how do I do this?

/ Carl

Comments

  • Damian_offthegridDamian_offthegrid Administrator, Moderator Posts: 768 admin
    Would have to look into this. Right now we work in XYZ. Also, It is up to you to make sure the map your trying to add allows saving for offline use and that your not breaking any licensing issues. For example Bing does not and it is already one of our map types for online use? So if you have any examples of maps "allowing" you to save for offline use or one you would like to see added for "online" use only... in this Quad format... please let us know.

    Example: Google Hybrid. They do not authorize saving for offline use but here is an example
    http://mt1.google.com/vt/lyrs=y&[email protected]&[email protected]&[email protected]

  • carloericarloeri Member Posts: 15
    Yes, I am aware of the licensing issues.

    I would also like to see LeadNav compatible with TMS-maps (inverted Y-coordinate).

    About Bing, how much data does LeadNav cache when you are browsing one of the online maps?
  • Damian_offthegridDamian_offthegrid Administrator, Moderator Posts: 768 admin
    LeadNav caches little above the standard small amount when scrolling around. Its not meant to save anything for offline use it just helps the app run fluid.

    Map saving and storage is primarily handled through our $20 map and $150 Pro Pack subscriptions. the regular map sub allowing 50mb per tile saving for people generally on foot and Pro pack 1 gig per tile saving for folks needing larger areas with the "save along route" feature for longer planned trips. These allow saving of our maps through that subscription to be borrowed to your device for offline use.

    LEADNAV also handles MBTile maps and overlays imported.

    TMS seems to be a less then common type as most support XYZ

    However here is a little write up we found


    -----------------------------

    The difference between XYZ and TMS tiles and how to convert between them

    Lots of tile-based maps use either the XYZ or TMS scheme. These are the maps that have tiles ending in /0/0/0.png or something. Sometimes if it's a script, it'll look like &z=0&y=0&x=0 instead. Anyway, these are usually maps in Spherical Mercator.

    Good examples are OpenStreetMap, Google Maps, MapBox, MapQuest, etc. Lots of maps.

    Most of those are in XYZ. The best documentation for that is slippy map tilenames on the OSM Wiki, and Klokan's Tiles a la Google.

    Some of them are in TMS instead. TMS is an OSGeo spec. Here's the wiki page on it. It's less popular and few services support the whole spec.

    There are no advantages of XYZ over TMS or vice-versa for most maps*, but XYZ is more popular.

    Converting

    Let's get to the point. The only difference between the two is a flipped y coordinate.

    In math:

    y = (2^z) - y - 1
    javascript

    y = Math.pow(2, z) - y - 1;
    php

    y = pow(2, z) - y - 1;
    python

    y = (2 ** z) - y - 1
    ruby

    y = (2 ** z) - y - 1
    Addendum

    When I say 'no difference' or 'no advantage' I mean for most maps. If you have some weird projection, use TMS but ideally don't make a tiled map in a weird projection in the first place. If you're forced to use OSGeo standards, do that but try to find a different job.

    This originally credited OGC with TMS. It was OSGeo. OGC has WMTS. Don't use that either.
  • carloericarloeri Member Posts: 15
    I have tried the minus sign before @y in my custom URL but I cant get it to work, but I will give it one more try to "crack the code". Thanks!

    I have the LeadNav Pro version.

    I am very dependent on my custom map because Mapbox does not offer very good sat photos outside the major cities in Afghanistan. For every task I need to check which provider has the best photos, usually it is ArcGIS or Bing right now. Google's photos are just too old for Afg, most of them are from 2004-2009.

  • Damian_offthegridDamian_offthegrid Administrator, Moderator Posts: 768 admin
    In Afghanistan and "other" locations that we needed imagery for we used a open source software called MOBAC on a laptop utilizing a VPN through our satellites to pull larger area of imagery into a single MBTile file that can be imported into LEADNAV through iTunes (drag n drop). You can find Map types out there to plug in if you do a little google searching.

    Or plug that Google HB link I sent earlier into the LEADNAV Custom Map option.....
  • Damian_offthegridDamian_offthegrid Administrator, Moderator Posts: 768 admin
    Once the MBTile is built and drug in it can be toggled on and off in LEADNAV > Settings > Map > Overlays
  • Damian_offthegridDamian_offthegrid Administrator, Moderator Posts: 768 admin
    Bing can be found for MOBAC..
  • carloericarloeri Member Posts: 15

    Once the MBTile is built and drug in it can be toggled on and off in LEADNAV > Settings > Map > Overlays

    Yeah, tried doing MBTile maps with QGIS... QGIS did not do it very well.

    I'll try MOBAC.
  • Damian_offthegridDamian_offthegrid Administrator, Moderator Posts: 768 admin
    Gotta just be sure to build them out in consecutive zoom levels without skipping. That is the only issue we see with MOBAC builds
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!