WMTS test in new beta version

TrailfinderTrailfinder Global Mapper UserPosts: 21Trusted User
edited September 2012 in Bug Report
Hello Mike,

I'm trying the new WMTS feature in Global Mapper v14.0 (b082912) Beta 1.
I've chosen a WMTS server from South Tyrol, Italy:
http://sdi.provinz.bz.it/geoserver/gwc/service/wmts?REQUEST=getcapabilities

Selecting a layer using TileMatrixSet "EPSG:4326" e.g. "Grundkarte - Carta Tecnica 1:10000 2007" (id apb-pab:gk10_2007) everythings works fine -great!
But some layers (e.g. "Mappa catastale - Katasterkarte", id TMS_cadastral_parcel) use TileMatrixSet "GIS_APB-PAB", which uses UTM projection (EPSG 25832). These layers aren't shown by GM. Network analyzing shows that there are not any GetTile-Requests at all!
The metadata of this layer as shown by GM are:

FILENAME=
DESCRIPTION=Mappa catastale - Katasterkarte
UPPER LEFT X=5343376.000
UPPER LEFT Y=590000.000
LOWER RIGHT X=-392989.130
LOWER RIGHT Y=0.000
WEST LONGITUDE=0° 54' 57.5246" E
NORTH LATITUDE=5° 21' 59.4545" N
EAST LONGITUDE=49° 06' 3.6677" E
SOUTH LATITUDE=0° 01' 43.9773" S
PROJ_DESC=UTM Zone 32 / ETRS89 / meters
PROJ_DATUM=ETRS89
PROJ_UNITS=meters
EPSG_CODE=3044
COVERED AREA=1306740 sq mi
PIXEL WIDTH=0.175 meters
PIXEL HEIGHT=0.175 meters
BIT_DEPTH=24

The bounding box looks very strange, doesn't it?
The TopLeftCorner defined in capabilities document is: "590000.0 5343376.0".
I think GM exchanged x for y, refer also to epsg codes 25832 resp. 3044 (order of x and y reversed!)

Regards
Helmut

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited September 2012
    Helmut,

    It appears you are correct, the X and Y interpretation were flipped (I would like the throttle whomever decided that the order of the X and Y coordinates in the element should depend on the projection being used, so you have to decode the EPSG projection code to determine if it's 'lat lon' or 'x y'). I have updated Global Mapper to use the proper order for non-lat-lon data sets and now all seems to work fine. I have placed a new build at http://www.globalmapper.com/global_mapper14.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v14.xx installation folder to give it a try. If you are using the 64-bit v14 version there is a new build at http://www.globalmapper.com/global_mapper14_64bit.zip .

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • TrailfinderTrailfinder Global Mapper User Posts: 21Trusted User
    edited September 2012
    Hello Mike,

    thank you - now it works fine.

    1) In the metadata window the epsg code 3044 is still shown. Shoudn't it be 25832 instead?

    2) Another little issue is that the Remove Source button on the Select online data source dialog doesn't work.

    3) I also tried to choose another Projection (Mercator instead of Lat/Long) in the select wmts source dialog, but it's not accepted (will be ignored).

    4) Do you plan to implement also the REST URL syntax , not only KVP?

    Thank you

    Best wishes
    Helmut
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited September 2012
    Helmut,

    The EPSG codes 3044 and 25832 are identical, so for display in the metadata you actually get whichever one is first in Global Mapper's internal list. Basically the EPSG code for the tile set is turned into an internal projection object, then when the metadata shows it does a reverse lookup of the projection to find the EPSG code. This finds 3044 before 25832, but it really doesn't matter as the definitions are identical.

    I will look at issues 2 and 3 and see what is going on. As for the REST URL syntax, is there much benefit to that? I haven't heard much about it and everything seems to work as is. I found an article on it at http://www.rajsingh.org/2010/10/ogc-services-and-rest/, but it didn't seem to see much benefit in REST vs. KVP for OGC sources.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • TrailfinderTrailfinder Global Mapper User Posts: 21Trusted User
    edited September 2012
    Hello Mike,

    EPSG:
    the mentioned epsg codes just differ in the order of axis: 25832 is east-north, and 3044 is north-east.
    It's not really import concerning metadata display, I think. But maybe there will be some irritation...

    REST:
    I found a wmts source from Switzerland using RESTful URLs, the official geodata of Swisstopo and others:
    http://wmts.geo.admin.ch/1.0.0/WMTSCapabilities.xml
    But its' not free...
    Also the GIS of Vienna uses REST:
    http://www.wien.gv.at/wmts/1.0.0/WMTSCapabilities.xml

    Regards,
    Helmut
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited September 2012
    Helmut,

    I've got the issues fixed with not being able to remove custom WMTS sources and also with the projection selection not working. Make sure you have the v14.0 beta 2 installed then you can apply the latest build. I have placed a new build at http://www.globalmapper.com/global_mapper14.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v14.xx installation folder to give it a try. If you are using the 64-bit v14 version there is a new build at http://www.globalmapper.com/global_mapper14_64bit.zip .

    I'll check out the RESTful service.

    For the EPSG code, are you saying that the order of the X/Y coordinates in the GetCapabilities document differs depending on whether you use 25832 or 3044 even though they represent the exact same projection? If so how on earth would you know which one it was without a complete EPSG database at your fingertips when loading the document?

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited September 2012
    I took a look at the Vienna RESTful service. I did make a change so that the way they encode the SRS (the string looks like 'urn:ogc:def:crs:EPSG:6.18:3:3857', man those things have gotten long and hard to parse) so that the projection will be recognized and the data placed properly. I get an error 403 (forbidden) from the service though, so I think I can't access the data. I have placed a new build at http://www.globalmapper.com/global_mapper14.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v14.xx installation folder to give it a try. If you are using the 64-bit v14 version there is a new build at http://www.globalmapper.com/global_mapper14_64bit.zip .

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • TrailfinderTrailfinder Global Mapper User Posts: 21Trusted User
    edited September 2012
    Hi Mike,

    thank you again for your fast reaction.

    Now I've chosen the layer Basemap Southtyrol WGS84 and got the following error message:

    Error loading WMTS data source.
    Unable to find a supported format for data source.
    OGCWMTSOverlay.cpp - 277
    Version: v14.0.0 (32-bit)
    Build Time: Sep 8 2012 17:50:29

    I think the reason for this error is the format image/png8 in the capabilities doc.

    Regards,
    Helmut
  • TrailfinderTrailfinder Global Mapper User Posts: 21Trusted User
    edited September 2012
    I took a look at the Vienna RESTful service.[...] I get an error 403 (forbidden) from the service though, so I think I can't access the data.[...]

    Mike,

    here is an example of a RESTful tile from Vienna:
    http://maps4.wien.gv.at/wmts/lb/farbe/google3857/15/11361/17866.jpeg
    There is no access restriction!

    Please look at the ResourceURL element of the layer lb:
    <ResourceURL resourceType="tile" template="http://maps4.wien.gv.at/wmts/lb/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpeg" format="image/jpeg"/>

    The request sent by GM (b090812) was:
    http://maps4.wien.gv.at/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&FORMAT=image/jpeg&LAYER=lb&TILEMATRIXSET=google3857&TILEMATRIX=15&TILEROW=11362&TILECOL=17877

    Thanks,
    Helmut
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited September 2012
    Helmut,

    You are correct about the format. I added 'image/png8' and 'image/png24' as supported format names and now it works fine. I have placed a new build at http://www.globalmapper.com/global_mapper14.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v14.xx installation folder to give it a try. If you are using the 64-bit v14 version there is a new build at http://www.globalmapper.com/global_mapper14_64bit.zip .

    I will look at the RESTful URL and see if I can add support for that custom URL format.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • TrailfinderTrailfinder Global Mapper User Posts: 21Trusted User
    edited September 2012

    You are correct about the format. I added 'image/png8' and 'image/png24' as supported format names and now it works fine.

    Mike, thank you. Now I can see the map Basemap Southtyrol WGS84. Unfortunately, lat and lon are again flipped, and so the map is wrong positioned:
    FILENAME=
    DESCRIPTION=Basemap Southtyrol WGS84
    UPPER LEFT X=280.1651000977
    UPPER LEFT Y=-222.8109741211
    LOWER RIGHT X=282.7249145508
    LOWER RIGHT Y=-223.8299560547
    WEST LONGITUDE=280° 09' 54.3604" E
    NORTH LATITUDE=222° 48' 39.5068" S
    EAST LONGITUDE=282° 43' 29.6924" E
    SOUTH LATITUDE=223° 49' 47.8418" S
    PROJ_DESC=Geographic (Latitude/Longitude) / WGS84 / arc degrees
    PROJ_DATUM=WGS84
    PROJ_UNITS=arc degrees
    EPSG_CODE=4326
    PIXEL WIDTH=0.0000054 arc degrees
    PIXEL HEIGHT=0.0000054 arc degrees
    BIT_DEPTH=24

    Best wishes,
    Helmut
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited September 2012
    Helmut,

    Ah yes they are. I am very confused thought. There are multiple WGS84 tille sets that use a CRS of urn:ogc:def:crs:EPSG::4326, and some list a <TopLeftCorner> of -180.0 90.0 (longitude then latitude like the WMTS_WGS84 tile set) and others use 90.0 -180 (latitude then longitude, like the GoogleCRS84Quad and EPSG:4326 tile matrix sets). I had been keying off of the CRS used to determine what coordinate order was used, but now there are these sets with the same CRS but different orders. Surely this can't be correct and one of them must be wrong? In fact the WMTS_WGS84 tile set used by the Basemap Southtyrol WGS84 data set seems to be the only one that provides them in the longitude then latitude order for that CRS.

    I can detect this particular situation where it is obvious they are flipped, but this is surely an error for that online source I would think. There must not be this much intentional complexity in the X and Y coordinate order, that should really be set once as X and Y for all CRS's. There's no good reason to make the order variable.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited September 2012
    Helmut,

    I have added detection for this seemingly erroneous specification of the top left corner and now it works fine. I have placed a new build at http://www.globalmapper.com/global_mapper14.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v14.xx installation folder to give it a try. If you are using the 64-bit v14 version there is a new build at http://www.globalmapper.com/global_mapper14_64bit.zip .

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited September 2012
    Helmut,

    Good news! I have the RESTful support working now. That Austria server is FAST! I have placed a new build at http://www.globalmapper.com/global_mapper14.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v14.xx installation folder to give it a try. If you are using the 64-bit v14 version there is a new build at http://www.globalmapper.com/global_mapper14_64bit.zip .

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • TrailfinderTrailfinder Global Mapper User Posts: 21Trusted User
    edited September 2012
    Hello Mike,

    many thanks once again. Great support!

    I think you are right that the South Tyrol wmts metadata is not correct. Probably the urn CRS definition they used was not the right one. I will contact them about this issue.

    Best wishes,
    Helmut
  • TrailfinderTrailfinder Global Mapper User Posts: 21Trusted User
    edited September 2012
    Hi Mike,

    the South Tyrol GIS office has now changed the WMTS capabilities. In fact, it was erroneous.
    http://sdi.provinz.bz.it/geoserver/gwc/service/wmts?REQUEST=getcapabilities

    Regards
    Helmut
Sign In or Register to comment.