Wrong case of "TileOutOfRange" Error?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Wrong case of "TileOutOfRange" Error?

Julian

Hi list,

 

we are using MapCache 1.6.1 as a WMTS and TMS server in front of a WMS, for the most part with success :-)

 

However, a request like

 

http://xx.xx.xx.xx/servicename/wmts/?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=layername&STYLE=default&TILEMATRIXSET=GSTutm32&TILEMATRIX=5&TILEROW=40&TILECOL=64&FORMAT=image%2Fpng

 

returns

 

<?xml version="1.0" encoding="UTF-8"?>

<ExceptionReport xmlns="http://www.opengis.net/ows/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ows/2.0 owsExceptionReport.xsd" version="1.0.0" xml:lang="en">

<!-- tile y=5 not in [6,44[ -->

<Exception exceptionCode="TileOutOfRange" locator="TileRow"/>

</ExceptionReport>

 

which puzzles me for two reasons:

1) I did not request a tile with “y=5”

2) The GetCapabilities show me

                           <Contents>

                                                      <Layer>

                                                                                  <ows:Title>layername</ows:Title>

                                                                                  <ows:Identifier>layername</ows:Identifier>

                                                                                  <Style isDefault="true">

                                                                                                             <ows:Identifier>default</ows:Identifier>

                                                                                  </Style>

                                                                                  <Format>image/png</Format>

                                                                                  <TileMatrixSetLink>

                                                                                                             <TileMatrixSet>GSTutm32</TileMatrixSet>

                                                                                                             <TileMatrixSetLimits>

                                                                                                             ...

                                                                                                                                        <TileMatrixLimits>

                                                                                                                                                                   <TileMatrix>GSTutm32:5</TileMatrix>

                                                                                                                                                                   <MinTileRow>6</MinTileRow>

                                                                                                                                                                   <MaxTileRow>43</MaxTileRow>

                                                                                                                                                                   <MinTileCol>19</MinTileCol>

                                                                                                                                                                   <MaxTileCol>64</MaxTileCol>

                                                                                                                                        </TileMatrixLimits>

 

In the configuration file, I have:

 

<?xml version="1.0"?>

<mapcache xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <grid name="GSTutm32">

    <metadata />

    <extent>120000 5900000 1000000 6500000</extent>

    <srs>EPSG:25832</srs>

    <units>m</units>

    <size>256 256</size>

    <resolutions>1638.4 819.2 409.6 204.8 102.4 51.2 25.6 12.8 6.4 3.2 1.6 0.8 0.4 0.2 0.1 0.05</resolutions>

  </grid>

  <source name="source_service" type="wms">

    <getmap>

      <params>

        <FORMAT>image/png</FORMAT>

        <LAYERS>wms_layername</LAYERS>

      </params>

    </getmap>

    <http>

      <url>http://172.30.229.42/fcgi-bin/mapserv.fcgi?map=/mapserver/config/source_service.map</url>

    </http>

  </source>

  <cache name="couchbase" type="memcache">

    <server>

      <host>yy.yy.yy.yy</host>

      <port>11211</port>

    </server>

  </cache>

  <tileset name="layername">

    <source>source_service</source>

    <cache>couchbase</cache>

    <grid restricted_extent="440000 6048000 894000 6404000" use_wms_intermediate_resolutions="false">GSTutm32</grid>

    <format>PNG</format>

    <metatile>5 5</metatile>

    <metabuffer>10</metabuffer>

  </tileset>

...

 

Am i missing something, or is this simply a bug in the handling of a <grid> with restricted_extent?

 

Best Regards,

/julian


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

Re: Wrong case of "TileOutOfRange" Error?

Ian Turton
It looks like MapServer is mixing up tileset and tilerow (probably a cut and paste error in the error message) - I think the tile matrix should be GSTutm32:5 not just 5.

Ian

On Thu, 21 Jun 2018 at 15:05, Julian Hollingbery <[hidden email]> wrote:

Hi list,

 

we are using MapCache 1.6.1 as a WMTS and TMS server in front of a WMS, for the most part with success :-)

 

However, a request like

 

http://xx.xx.xx.xx/servicename/wmts/?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=layername&STYLE=default&TILEMATRIXSET=GSTutm32&TILEMATRIX=5&TILEROW=40&TILECOL=64&FORMAT=image%2Fpng

 

returns

 

<?xml version="1.0" encoding="UTF-8"?>

<ExceptionReport xmlns="http://www.opengis.net/ows/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ows/2.0 owsExceptionReport.xsd" version="1.0.0" xml:lang="en">

<!-- tile y=5 not in [6,44[ -->

<Exception exceptionCode="TileOutOfRange" locator="TileRow"/>

</ExceptionReport>

 

which puzzles me for two reasons:

1) I did not request a tile with “y=5”

2) The GetCapabilities show me

                           <Contents>

                                                      <Layer>

                                                                                  <ows:Title>layername</ows:Title>

                                                                                  <ows:Identifier>layername</ows:Identifier>

                                                                                  <Style isDefault="true">

                                                                                                             <ows:Identifier>default</ows:Identifier>

                                                                                  </Style>

                                                                                  <Format>image/png</Format>

                                                                                  <TileMatrixSetLink>

                                                                                                             <TileMatrixSet>GSTutm32</TileMatrixSet>

                                                                                                             <TileMatrixSetLimits>

                                                                                                             ...

                                                                                                                                        <TileMatrixLimits>

                                                                                                                                                                   <TileMatrix>GSTutm32:5</TileMatrix>

                                                                                                                                                                   <MinTileRow>6</MinTileRow>

                                                                                                                                                                   <MaxTileRow>43</MaxTileRow>

                                                                                                                                                                   <MinTileCol>19</MinTileCol>

                                                                                                                                                                   <MaxTileCol>64</MaxTileCol>

                                                                                                                                        </TileMatrixLimits>

 

In the configuration file, I have:

 

<?xml version="1.0"?>

<mapcache xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <grid name="GSTutm32">

    <metadata />

    <extent>120000 5900000 1000000 6500000</extent>

    <srs>EPSG:25832</srs>

    <units>m</units>

    <size>256 256</size>

    <resolutions>1638.4 819.2 409.6 204.8 102.4 51.2 25.6 12.8 6.4 3.2 1.6 0.8 0.4 0.2 0.1 0.05</resolutions>

  </grid>

  <source name="source_service" type="wms">

    <getmap>

      <params>

        <FORMAT>image/png</FORMAT>

        <LAYERS>wms_layername</LAYERS>

      </params>

    </getmap>

    <http>

      <url>http://172.30.229.42/fcgi-bin/mapserv.fcgi?map=/mapserver/config/source_service.map</url>

    </http>

  </source>

  <cache name="couchbase" type="memcache">

    <server>

      <host>yy.yy.yy.yy</host>

      <port>11211</port>

    </server>

  </cache>

  <tileset name="layername">

    <source>source_service</source>

    <cache>couchbase</cache>

    <grid restricted_extent="440000 6048000 894000 6404000" use_wms_intermediate_resolutions="false">GSTutm32</grid>

    <format>PNG</format>

    <metatile>5 5</metatile>

    <metabuffer>10</metabuffer>

  </tileset>

...

 

Am i missing something, or is this simply a bug in the handling of a <grid> with restricted_extent?

 

Best Regards,

/julian

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


--
Ian Turton

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

Re: Wrong case of "TileOutOfRange" Error?

jratike80
In reply to this post by Julian

Hi,

 

I don’t see a relevant part of GetCapabilities but I believe that the name of the tile matrix in MapCache based WMTS services is plain ”5” like here

 

https://avoin-karttakuva.maanmittauslaitos.fi/avoin/wmts/1.0.0/WMTSCapabilities.xml

GetTile example

https://avoin-karttakuva.maanmittauslaitos.fi/avoin/wmts?service=WMTS&request=GetTile&version=1.0.0&layer=maastokartta&style=default&format=image/png&TileMatrixSet=ETRS-TM35FIN&TileMatrix=6&TileRow=44&TileCol=27

 

-Jukka Rahkonen-

 

 

 

Lähettäjä: mapserver-users [[hidden email]] Puolesta Ian Turton
Lähetetty: 21. kesäkuuta 2018 17:12
Vastaanottaja: Julian Hollingbery <[hidden email]>
Kopio: [hidden email]
Aihe: Re: [mapserver-users] Wrong case of "TileOutOfRange" Error?

 

It looks like MapServer is mixing up tileset and tilerow (probably a cut and paste error in the error message) - I think the tile matrix should be GSTutm32:5 not just 5.

 

Ian

 


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

Re: Wrong case of "TileOutOfRange" Error?

Julian

Hi Ian and Jukka,

 

Thanks for your response!

 

However, I’m pretty sure that the TileMatrix-parameter is good, since this works nicely:

 

.. &TILEMATRIXSET=GSTutm32&TILEMATRIX=5&TILEROW=39&TILECOL=64&FORMAT=image%2Fpng

 

(TileRow changed from 40 to 39).

After all, I copied the request from http://xx.xx.xx.xx/servicename/demo/wmts, which, incidentally, shows the infamous pink tiles, if I pan to the outer edges of the tilegrid.

 

Regards,

/julian

 

Fra: Rahkonen Jukka (MML) <[hidden email]>
Sendt: 21. juni 2018 17:58
Til: Ian Turton <[hidden email]>; Julian Hollingbery <[hidden email]>
Cc: [hidden email]
Emne: Re: [mapserver-users] Wrong case of "TileOutOfRange" Error?

 

Hi,

 

I don’t see a relevant part of GetCapabilities but I believe that the name of the tile matrix in MapCache based WMTS services is plain ”5” like here

 

https://avoin-karttakuva.maanmittauslaitos.fi/avoin/wmts/1.0.0/WMTSCapabilities.xml

GetTile example

https://avoin-karttakuva.maanmittauslaitos.fi/avoin/wmts?service=WMTS&request=GetTile&version=1.0.0&layer=maastokartta&style=default&format=image/png&TileMatrixSet=ETRS-TM35FIN&TileMatrix=6&TileRow=44&TileCol=27

 

-Jukka Rahkonen-

 

 

 

Lähettäjä: mapserver-users [[hidden email]] Puolesta Ian Turton
Lähetetty: 21. kesäkuuta 2018 17:12
Vastaanottaja: Julian Hollingbery <
[hidden email]>
Kopio:
[hidden email]
Aihe: Re: [mapserver-users] Wrong case of "TileOutOfRange" Error?

 

It looks like MapServer is mixing up tileset and tilerow (probably a cut and paste error in the error message) - I think the tile matrix should be GSTutm32:5 not just 5.

 

Ian

 


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

Re: Wrong case of "TileOutOfRange" Error?

tbonfort
here is how the y=5 you are seeing is calculated:


On Fri, Jun 22, 2018 at 9:05 AM Julian Hollingbery <[hidden email]> wrote:

Hi Ian and Jukka,

 

Thanks for your response!

 

However, I’m pretty sure that the TileMatrix-parameter is good, since this works nicely:

 

.. &TILEMATRIXSET=GSTutm32&TILEMATRIX=5&TILEROW=39&TILECOL=64&FORMAT=image%2Fpng

 

(TileRow changed from 40 to 39).

After all, I copied the request from http://xx.xx.xx.xx/servicename/demo/wmts, which, incidentally, shows the infamous pink tiles, if I pan to the outer edges of the tilegrid.

 

Regards,

/julian

 

Fra: Rahkonen Jukka (MML) <[hidden email]>
Sendt: 21. juni 2018 17:58
Til: Ian Turton <[hidden email]>; Julian Hollingbery <[hidden email]>
Cc: [hidden email]
Emne: Re: [mapserver-users] Wrong case of "TileOutOfRange" Error?

 

Hi,

 

I don’t see a relevant part of GetCapabilities but I believe that the name of the tile matrix in MapCache based WMTS services is plain ”5” like here

 

https://avoin-karttakuva.maanmittauslaitos.fi/avoin/wmts/1.0.0/WMTSCapabilities.xml

GetTile example

https://avoin-karttakuva.maanmittauslaitos.fi/avoin/wmts?service=WMTS&request=GetTile&version=1.0.0&layer=maastokartta&style=default&format=image/png&TileMatrixSet=ETRS-TM35FIN&TileMatrix=6&TileRow=44&TileCol=27

 

-Jukka Rahkonen-

 

 

 

Lähettäjä: mapserver-users [[hidden email]] Puolesta Ian Turton
Lähetetty: 21. kesäkuuta 2018 17:12
Vastaanottaja: Julian Hollingbery <
[hidden email]>
Kopio:
[hidden email]
Aihe: Re: [mapserver-users] Wrong case of "TileOutOfRange" Error?

 

It looks like MapServer is mixing up tileset and tilerow (probably a cut and paste error in the error message) - I think the tile matrix should be GSTutm32:5 not just 5.

 

Ian

 

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

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

Re: Wrong case of "TileOutOfRange" Error?

Julian

Thanks for that pointer, Thomas.

So, if I read the code correctly, here is the line which reads the "restricted_extent" attribute from the configuration file:
https://github.com/mapserver/mapcache/blob/master/lib/configuration_xml.c#L680
and stores it in gridlink->restricted_extent.
Here is the line which produces the error I see, after checking against tile->grid_link->grid_limits
https://github.com/mapserver/mapcache/blob/master/lib/tileset.c#L176

But I can find nowhere in the code where either
1) gridlink->restricted_extent is substituted into grid_link->grid_limits, or
2) A check is performed of tile->grid_link->grid_limits against gridlink->restricted_extent

Shouldn't I be able to find such code?

Regards
/julian


Fra: thomas bonfort <[hidden email]>
Sendt: 22. juni 2018 10:12:45
Til: Julian Hollingbery
Cc: Rahkonen Jukka (MML); Ian Turton; [hidden email]
Emne: Re: [mapserver-users] Wrong case of "TileOutOfRange" Error?
 
here is how the y=5 you are seeing is calculated:


On Fri, Jun 22, 2018 at 9:05 AM Julian Hollingbery <[hidden email]> wrote:

Hi Ian and Jukka,

 

Thanks for your response!

 

However, I’m pretty sure that the TileMatrix-parameter is good, since this works nicely:

 

.. &TILEMATRIXSET=GSTutm32&TILEMATRIX=5&TILEROW=39&TILECOL=64&FORMAT=image%2Fpng

 

(TileRow changed from 40 to 39).

After all, I copied the request from http://xx.xx.xx.xx/servicename/demo/wmts, which, incidentally, shows the infamous pink tiles, if I pan to the outer edges of the tilegrid.

 

Regards,

/julian

 

Fra: Rahkonen Jukka (MML) <[hidden email]>
Sendt: 21. juni 2018 17:58
Til: Ian Turton <[hidden email]>; Julian Hollingbery <[hidden email]>
Cc: [hidden email]
Emne: Re: [mapserver-users] Wrong case of "TileOutOfRange" Error?

 

Hi,

 

I don’t see a relevant part of GetCapabilities but I believe that the name of the tile matrix in MapCache based WMTS services is plain ”5” like here

 

https://avoin-karttakuva.maanmittauslaitos.fi/avoin/wmts/1.0.0/WMTSCapabilities.xml

GetTile example

https://avoin-karttakuva.maanmittauslaitos.fi/avoin/wmts?service=WMTS&request=GetTile&version=1.0.0&layer=maastokartta&style=default&format=image/png&TileMatrixSet=ETRS-TM35FIN&TileMatrix=6&TileRow=44&TileCol=27

 

-Jukka Rahkonen-

 

 

 

Lähettäjä: mapserver-users [[hidden email]] Puolesta Ian Turton
Lähetetty: 21. kesäkuuta 2018 17:12
Vastaanottaja: Julian Hollingbery <
[hidden email]>
Kopio:
[hidden email]
Aihe: Re: [mapserver-users] Wrong case of "TileOutOfRange" Error?

 

It looks like MapServer is mixing up tileset and tilerow (probably a cut and paste error in the error message) - I think the tile matrix should be GSTutm32:5 not just 5.

 

Ian

 

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

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