Global Mapper v25.0

Encoding in TMS URL query

falqn
falqn Global Mapper UserTrusted User
edited March 2012 in Downloading Imagery
Hi,
I want to use TMS modified in v13.1 with this base URL: http://mt1.google.com/vt/lyrs=m@1&x=%x&y=%y&z=%z . URL http://mt1.google.com/vt/lyrs=m@1&x=15&y=15&z=4 is working fine in web browser. But when I type base URL GM says:

"Error downloading OSM Tile data tile
/vt/lyrs=m@1%26x=15%26y=15%26z=4
OSM Tile image query failed with status code 400.

In URL sign "&" was replaced by "%26" - why?
It looks like some problems with encoding (espace/unescape)?
Best regards
Wojtek from Poland

Comments

  • global_mapper
    global_mapper Administrator
    edited March 2012
    Wojtek,

    Indeed there was a problem, the URL parser was replacing the special & with its encoded value of %26. I fixed this and now the Google Maps data works great! Only wish we could add that as a built-in source without running afoul of Google's Terms of Service.

    I have placed a new build at http://www.globalmapper.com/global_mapper13.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v13.xx installation folder to give it a try. If you are using the 64-bit v13 version there is a new build at http://www.globalmapper.com/global_mapper13_64bit.zip .

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • falqn
    falqn Global Mapper User Trusted User
    edited March 2012
    Mike,
    Thank you very much, works great now!

    I have one more question connected with new TMS, is it possible to add more custom options in this feature? I'm trying to do something with base URL like this: http://ars.geoportal.gov.pl/ARS/getTile.aspx?service=BDO&cs=EPSG2180&fileIDX=L%zX%xY%y.png&DateStamp=20081006 but
    this data is in other projection (EPSG2180), tile numbering is different - please see image http://4.bp.blogspot.com/_NQsNXWEqCy8/Smw_92PaCAI/AAAAAAAAAhY/yjlPuo3xCLc/s1600/ars.png .
    And other parameters like LZTS (level zero tile size), TileCountX, Y, TileLevel... are different from standard OSM tiles.
    It will be great if GM could import those TMS parameters from XML file like this which represents "my" data:

    <GDAL_WMS>
    <Service name="TMS">
    <ServerUrl>
    http://ars.geoportal.gov.pl/ARS/getTile.aspx?service=BDO&cs=EPSG2180&fileIDX=L${z}X${x}Y${y}.png
    </ServerUrl>



    </Service>


    <DataWindow>
    <UpperLeftX>0</UpperLeftX>
    <UpperLeftY>819200</UpperLeftY>
    <LowerRightX>1228800</LowerRightX>
    <LowerRightY>0</LowerRightY>
    <TileLevel>6</TileLevel>
    <TileCountX>3</TileCountX>
    <TileCountY>2</TileCountY>
    <YOrigin>bottom</YOrigin>

    </DataWindow>


    <Projection>EPSG:2180</Projection>
    <BlockSizeX>256</BlockSizeX>
    <BlockSizeY>256</BlockSizeY>
    <BandsCount>4</BandsCount>
    <Cache>
    <Extension>.png</Extension>

    </Cache>



    </GDAL_WMS>

    Adding such options will be very usefull because TMS services are very popular on the web.
    Best regards
    Wojtek from Poland
  • global_mapper
    global_mapper Administrator
    edited March 2012
    Wojtek,

    I have added that to the todo list. We have been meaning to add support for both importing and exporting tile sets in projections other than Web Mercator allowing more generic tiling. When we do this things like that source should be supported. I'll probably base the definition on your sample if that is what is standard, at least from GDAL.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • falqn
    falqn Global Mapper User Trusted User
    edited March 2012
    Hi,
    My recent post is not visible on forum! But your answer is visible... strange. Something wrong is going on with my posts, I'have to wait on moderator and finally they are not visible, but you have ansvered on it...

    Continuing TMS discussion. I'ts good idea to add my propositions to todo list. My sample XML is in GDAL standard, but I'm not an expert in this stuff. More info about GDAL capabilities http://gdal.org/frmt_wms.html

    Best regards
    Wojtek from Poland
  • PaulTocknell
    PaulTocknell Forum Administrator Unconfirmed
    edited March 2012
    Sorry about that Wojtek. Your post has been validated and is now visible.

    Paul