WMTS "No zoom level found"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

WMTS "No zoom level found"

hugfr
Hello,

I try to create an xml file suitable for gdal wmts but I got this error "no zoom level found" (when I try a gdalinfo) and I don't understand where does the problem come from. I found this post about zoom level management : http://osgeo-org.1560.x6.nabble.com/WMTS-Need-TileLevel-option-Servers-responding-with-bad-capabilities-td5298089.html

I tried the xml with gdalinfo and it runs perfectly. I compared with mine and I didn't noticed major differences. I also took a comparative look at servers capabilities which seems similars. The main difference lays in the TileMatrix content.

Here is "mine":
<TileMatrixSetLimits>
<TileMatrixLimits>
<TileMatrix>10</TileMatrix>
<MinTileRow>340</MinTileRow>
<MaxTileRow>400</MaxTileRow>
<MinTileCol>493</MinTileCol>
<MaxTileCol>546</MaxTileCol>
</TileMatrixLimits>

Here is the one from https://basemap.nationalmap.gov/arcgis/rest/services/USGSShadedReliefOnly/MapServer/WMTS/1.0.0/WMTSCapabilities.xml
:
<TileMatrix>
<ows:Identifier>10</ows:Identifier>
<ScaleDenominator>545978.7734656851</ScaleDenominator>
<TopLeftCorner>-2.0037508342787E7 2.0037508342787E7</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>1025</MatrixWidth>
<MatrixHeight>1285</MatrixHeight>
</TileMatrix>

Does that mean "my" WMTS server can't be accessed using the gdal WMTS driver or did I miss something ? As far as I understand "my" wmts server is only accessible using TILEROW and TILECOL arguments, not a BBox, isn't it ?

Below, I have also copied the content of my xml file.

Regards,
Hug


<GDAL_WMTS>
 
<GetCapabilitiesUrl>http://wxs.ign.fr/KEY/geoportail/wmts?SERVICE=WMTS&REQUEST=GetCapabilities</GetCapabilitiesUrl>
  <Layer>GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD</Layer>
 
  <TileMatrixSet>PM</TileMatrixSet>
  <TileMatrix>15</TileMatrix>
  <ZoomLevel>15</ZoomLevel>
  <Format>image/jpeg</Format>
  <DataWindow>
          <UpperLeftX>666947.416653756</UpperLeftX>
          <UpperLeftY>5666660.80226639</UpperLeftY>
          <LowerRightX>674402.416653756</LowerRightX>
          <LowerRightY>5658330.40226639</LowerRightY>
  </DataWindow>
  <BandsCount>4</BandsCount>
  <Cache />
  <UnsafeSSL>true</UnsafeSSL>
  <ZeroBlockHttpCodes>404</ZeroBlockHttpCodes>
  <ZeroBlockOnServerException>true</ZeroBlockOnServerException>
  </GDAL_WMTS>
Reply | Threaded
Open this post in threaded view
|

Re: WMTS "No zoom level found"

Even Rouault-2

On vendredi 5 mai 2017 08:09:30 CEST hugfr wrote:

> Hello,

>

> I try to create an xml file suitable for gdal wmts but I got this error "no

> zoom level found" (when I try a gdalinfo) and I don't understand where does

> the problem come from. I found this post about zoom level management :

> http://osgeo-org.1560.x6.nabble.com/WMTS-Need-TileLevel-option-Servers-respo

> nding-with-bad-capabilities-td5298089.html

>

> I tried the xml with gdalinfo and it runs perfectly. I compared with mine

> and I didn't noticed major differences. I also took a comparative look at

> servers capabilities which seems similars. The main difference lays in the

> TileMatrix content.

>

> Here is "mine":

> <TileMatrixSetLimits>

> <TileMatrixLimits>

> <TileMatrix>10</TileMatrix>

> <MinTileRow>340</MinTileRow>

> <MaxTileRow>400</MaxTileRow>

> <MinTileCol>493</MinTileCol>

> <MaxTileCol>546</MaxTileCol>

> </TileMatrixLimits>

 

Did you just try

gdalinfo "WMTS:http://wxs.ign.fr/{KEY}/geoportail/wmts?SERVICE=WMTS&REQUEST=GetCapabilities"

 

If it does not, then attaching the response to this GetCapabilities request

might help investigating the issue.

 

Even

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: WMTS "No zoom level found"

Vautour, André (INT)
In reply to this post by hugfr
> -----Original Message-----
> From: gdal-dev [mailto:[hidden email]] On Behalf Of
> hugfr
> Sent: Friday, May 5, 2017 12:10
> To: [hidden email]
> Subject: [gdal-dev] WMTS "No zoom level found"
>
> Hello,
>
> I try to create an xml file suitable for gdal wmts but I got this error "no zoom
> level found" (when I try a gdalinfo) and I don't understand where does the
> problem come from. I found this post about zoom level management :
> http://osgeo-org.1560.x6.nabble.com/WMTS-Need-TileLevel-option-
> Servers-responding-with-bad-capabilities-td5298089.html
>
> I tried the xml with gdalinfo and it runs perfectly. I compared with mine and I
> didn't noticed major differences. I also took a comparative look at servers
> capabilities which seems similars. The main difference lays in the TileMatrix
> content.
>
> Here is "mine":
> <TileMatrixSetLimits>
> <TileMatrixLimits>
> <TileMatrix>10</TileMatrix>
> <MinTileRow>340</MinTileRow>
> <MaxTileRow>400</MaxTileRow>
> <MinTileCol>493</MinTileCol>
> <MaxTileCol>546</MaxTileCol>
> </TileMatrixLimits>
>
> Here is the one from
> https://basemap.nationalmap.gov/arcgis/rest/services/USGSShadedReliefO
> nly/MapServer/WMTS/1.0.0/WMTSCapabilities.xml
> :
> <TileMatrix>
> <ows:Identifier>10</ows:Identifier>
> <ScaleDenominator>545978.7734656851</ScaleDenominator>
> <TopLeftCorner>-2.0037508342787E7 2.0037508342787E7</TopLeftCorner>
> <TileWidth>256</TileWidth> <TileHeight>256</TileHeight>
> <MatrixWidth>1025</MatrixWidth> <MatrixHeight>1285</MatrixHeight>
> </TileMatrix>

You are comparing apples to oranges. TileMatrixSetLimits/TileMatrixLimits and TileMatrixSet/TileMatrix are not the same thing. The TileMatrix describes a given tile level of the TileMatrixSet. The TileMatrixLimits tell you which part of the TileMatrixSet actually contains data. For instance, the TileMatrixSet might cover the entire world, yet the actually data is only in New Zealand.

>
> Does that mean "my" WMTS server can't be accessed using the gdal WMTS
> driver or did I miss something ? As far as I understand "my" wmts server is
> only accessible using TILEROW and TILECOL arguments, not a BBox, isn't it ?

WMTS uses zoom level (TileMatrix identifier), x (col), y (row) to access tiles. How that relates to a BBox is calculated from the TileMatrix of the given zoom level.

André

>
> Below, I have also copied the content of my xml file.
>
> Regards,
> Hug
>
>
> <GDAL_WMTS>
>
> <GetCapabilitiesUrl>http://wxs.ign.fr/KEY/geoportail/wmts?SERVICE=WMTS
> &amp;REQUEST=GetCapabilities</GetCapabilitiesUrl>
>   <Layer>GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-
> EXPRESS.STANDARD</Layer>
>
>   <TileMatrixSet>PM</TileMatrixSet>
>   <TileMatrix>15</TileMatrix>
>   <ZoomLevel>15</ZoomLevel>
>   <Format>image/jpeg</Format>
>   <DataWindow>
>           <UpperLeftX>666947.416653756</UpperLeftX>
>           <UpperLeftY>5666660.80226639</UpperLeftY>
>           <LowerRightX>674402.416653756</LowerRightX>
>           <LowerRightY>5658330.40226639</LowerRightY>
>   </DataWindow>
>   <BandsCount>4</BandsCount>
>   <Cache />
>   <UnsafeSSL>true</UnsafeSSL>
>   <ZeroBlockHttpCodes>404</ZeroBlockHttpCodes>
>   <ZeroBlockOnServerException>true</ZeroBlockOnServerException>
>   </GDAL_WMTS>
>
>
>
>
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/WMTS-
> No-zoom-level-found-tp5319529.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: WMTS "No zoom level found"

hugfr
In reply to this post by Even Rouault-2

Hi,

Thanks for your quick reply. No, I did'nt try this simple command.

Here is the output (I removed some of them, keeping just the one I want to use but the whole output is attached to the message)

Regards,

Hug


gdalinfo "WMTS:http://wxs.ign.fr/{KEY}/geoportail/wmts?SERVICE=WMTS&REQUEST=GetCapabilities"
Driver: WMTS/OGC Web Mab Tile Service
Files: none associated
Size is 512, 512
Coordinate System is `'
Origin = (0.000000000000000,0.000000000000000)
Pixel Size = (1.000000000000000,1.000000000000000)
Subdatasets:
  SUBDATASET_89_NAME=WMTS:http://wxs.ign.fr/{KEY}/geoportail/wmts?SERVICE=WMTS&REQUEST=GetCapabilities,layer=GEOGRAPHICALGRIDSYST                  SUBDATASET_89_DESC=Layer PYRAMIDE SCANEXPRESS STANDARD
Corner Coordinates:
Upper Left  (   0.0000000,   0.0000000)
Lower Left  (       0.000,     512.000)
Upper Right (     512.000,       0.000)
Lower Right (     512.000,     512.000)
Center      (     256.000,     256.000)

----- Mail d'origine -----
De: Even Rouault <[hidden email]>
À: [hidden email]
Cc: hugfr <[hidden email]>
Envoyé: Fri, 05 May 2017 17:19:27 +0200 (CEST)
Objet: Re: [gdal-dev] WMTS "No zoom level found"


On vendredi 5 mai 2017 08:09:30 CEST hugfr wrote:

> Hello,

>

> I try to create an xml file suitable for gdal wmts but I got this error "no

> zoom level found" (when I try a gdalinfo) and I don't understand where does

> the problem come from. I found this post about zoom level management :

> http://osgeo-org.1560.x6.nabble.com/WMTS-Need-TileLevel-option-Servers-respo

> nding-with-bad-capabilities-td5298089.html

>

> I tried the xml with gdalinfo and it runs perfectly. I compared with mine

> and I didn't noticed major differences. I also took a comparative look at

> servers capabilities which seems similars. The main difference lays in the

> TileMatrix content.

>

> Here is "mine":

> <TileMatrixSetLimits>

> <TileMatrixLimits>

> <TileMatrix>10</TileMatrix>

> <MinTileRow>340</MinTileRow>

> <MaxTileRow>400</MaxTileRow>

> <MinTileCol>493</MinTileCol>

> <MaxTileCol>546</MaxTileCol>

> </TileMatrixLimits>

 

Did you just try

gdalinfo "WMTS:http://wxs.ign.fr/{KEY}/geoportail/wmts?SERVICE=WMTS&REQUEST=GetCapabilities"

 

If it does not, then attaching the response to this GetCapabilities request

might help investigating the issue.

 

Even

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com



_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: WMTS "No zoom level found"

Even Rouault-2

On vendredi 5 mai 2017 18:18:54 CEST Hugues François wrote:

> WMTS:http://wxs.ign.fr/{KEY}/geoportail/wmts?SERVICE=WMTS&REQUEST=GetCapabil

> ities,layer=GEOGRAPHICALGRIDSYST

 

OK, so now try

 

gdalinfo "WMTS:http://wxs.ign.fr/{KEY}/geoportail/wmts?SERVICE=WMTS&REQUEST=GetCapabilities,layer=GEOGRAPHICALGRIDSYST"

 

as suggested by the subdataset name.

 

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: WMTS "No zoom level found"

hugfr
Sorry, it took me sometimes to answer. I don't know what happenned with the copy/paste from terminal but the url was truncated.

However, it ran the gdalinfo with the right layer name and it is after this text.

Regards,

Hug


gdalinfo "WMTS:http://wxs.ign.fr/an7nvfzojv5wa96dsga5nk8w/geoportail/wmts?SERVICE=WMTS&REQUEST=GetCapabilities,layer=GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD"
Driver: WMTS/OGC Web Mab Tile Service
Files: none associated
Size is 7168, 7835
Coordinate System is:
PROJCS["WGS 84 / Pseudo-Mercator",
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4326"]],
PROJECTION["Mercator_1SP"],
PARAMETER["central_meridian",0],
PARAMETER["scale_factor",1],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AXIS["X",EAST],
AXIS["Y",NORTH],
EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],
AUTHORITY["EPSG","3857"]]
Origin = (-782715.169640224426985,6700469.899478564038873)
Pixel Size = (305.748113140704788,-305.748113140704788)
Metadata:
ABSTRACT=Cartographie topographique multi-échelles du territoire français issue des bases de données vecteur de l’IGN –réalisée selon un processus cartographique innovant fortement automatisé.
TITLE=PYRAMIDE SCANEXPRESS STANDARD
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( -782715.170, 6700469.899) ( 7d 1'52.50"W, 51d26'43.61"N)
Lower Left ( -782715.170, 4304933.433) ( 7d 1'52.50"W, 36d 1'52.79"N)
Upper Right ( 1408887.305, 6700469.899) ( 12d39'22.50"E, 51d26'43.61"N)
Lower Right ( 1408887.305, 4304933.433) ( 12d39'22.50"E, 36d 1'52.79"N)
Center ( 313086.068, 5502701.666) ( 2d48'45.00"E, 44d14'25.01"N)
Band 1 Block=128x128 Type=Byte, ColorInterp=Red
Overviews: 3584x3917, 1792x1959, 896x979, 448x490, 224x245
Mask Flags: PER_DATASET ALPHA
Overviews of mask band: 3584x3917, 1792x1959, 896x979, 448x490, 224x245
Band 2 Block=128x128 Type=Byte, ColorInterp=Green
Overviews: 3584x3917, 1792x1959, 896x979, 448x490, 224x245
Mask Flags: PER_DATASET ALPHA
Overviews of mask band: 3584x3917, 1792x1959, 896x979, 448x490, 224x245
Band 3 Block=128x128 Type=Byte, ColorInterp=Blue
Overviews: 3584x3917, 1792x1959, 896x979, 448x490, 224x245
Mask Flags: PER_DATASET ALPHA
Overviews of mask band: 3584x3917, 1792x1959, 896x979, 448x490, 224x245
Band 4 Block=128x128 Type=Byte, ColorInterp=Alpha
Overviews: 3584x3917, 1792x1959, 896x979, 448x490, 224x245


De: "Even Rouault" <[hidden email]>
À: "Hugues François" <[hidden email]>
Cc: [hidden email]
Envoyé: Vendredi 5 Mai 2017 18:27:27
Objet: Re: [gdal-dev] WMTS "No zoom level found"

On vendredi 5 mai 2017 18:18:54 CEST Hugues François wrote:

> WMTS:http://wxs.ign.fr/{KEY}/geoportail/wmts?SERVICE=WMTS&REQUEST=GetCapabil

> ities,layer=GEOGRAPHICALGRIDSYST

 

OK, so now try

 

gdalinfo "WMTS:http://wxs.ign.fr/{KEY}/geoportail/wmts?SERVICE=WMTS&REQUEST=GetCapabilities,layer=GEOGRAPHICALGRIDSYST"

 

as suggested by the subdataset name.

 

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com



_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: WMTS "No zoom level found"

Even Rouault-2

On vendredi 5 mai 2017 20:09:17 CEST Hugues François wrote:

> Sorry, it took me sometimes to answer. I don't know what happenned with the

> copy/paste from terminal but the url was truncated.

>

> However, it ran the gdalinfo with the right layer name and it is after this

> text.

 

So it looks like there's no issue with the server. The issue was likely in your XML file but you don't necessarily need it. You can use the WMTS:.... name for gdal_translate or gdalwarp operations.

If you want to try fixing your XML file, perhaps try removing the <DataWindow> to see if that has an effect, or check the TileMatrixSet name, or ...

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev