[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mapserver-dev
Subject:    [mapserver-dev] how to use tiles from gdal2tiles
From:       Bruce Clay <bclay1297 () gmail ! com>
Date:       2021-11-09 14:48:32
Message-ID: CAHemx53eLKU63rQKNvET3=7k+WNHOW+iNh9DYAuHxDPWQkn1pA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


My apologies to those on the GDAL list as well as here I posted ther a
couple of days ago but did not get any replies.

We have tile sets created by gdal2tiles.py as well as from other tools.  We
need to display the tiles i web using frameworks such as such as cesium or
worldwindjs.  We are using the latest mapserver from ms4w on windows 10.
iI we use seed_cache we get a tileset quite different from that of
gdal2tiles.  we configured the mapcache.xml file for those datasets and
they appear to work ok in QGIS.  Using the same configuration style for the
slippy map tiles lets them show in a get capabilities but not in QGIS nor a
simple one tile query.

the mapcache,xml entries are basicallt as follows

   <cache name="tileset_a_cache" type="disk">
     <base>C:/data_static/MapTiles</base>
  </cache>

  <source name="tileset_a_src" type="wms">
  <getmap>
    <params>
      <FORMAT>image/png</FORMAT>
      <LAYERS>TileSetA</LAYERS>
      <MAP>/data/config/map/nasaww.map</MAP>
    </params>
  </getmap>
  <http>
    <url>http://localhost/cgi-bin/mapserv.exe?</url>
  </http>
</source>

<tileset name=" tileset_a  ">
   <source> tileset_a  _src</source>
        <cache> tileset_a  _cache</cache>
        <grid>GoogleMapsCompatible</grid>
        <grid>g</grid>
        <format>PNG</format>
        <metatile>8 8</metatile>
    </tileset>


If I query wmts capabilities the dataset show in the list

http://localhost/mapcache/wmts?service=wmts&request=getcapabilities&version=1.0.0

<Layer>
<ows:Title>tileset_a</ows:Title>
<ows:Identifier> tileset_a  </ows:Identifier>
<Style isDefault="true">
<ows:Identifier>default</ows:Identifier>
</Style>
<Format>image/png</Format>
<TileMatrixSetLink>
<TileMatrixSet>GoogleMapsCompatible</TileMatrixSet>
</TileMatrixSetLink>
<TileMatrixSetLink>
<TileMatrixSet>g</TileMatrixSet>
</TileMatrixSetLink>
<ResourceURL format="image/png" resourceType="tile" template="
http://localhost/mapcache/wmts/1.0.0/tileset_a/default/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png
 "/>
</Layer>

if I add a wmts layer using the following in QGIS the layer shows in the
list
http://localhost/mapcache/wmts?service=wmts&request=getcapabilities&version=1.0.0

no tiles are displayed and the server error log has several entries of
WMS server error. Invalid layer(s) given in the LAYERS parameter.

if I try to add the tiles as andXYZ layer using the following no tiles are
displayed

http://localhost/mapcache/tms/1.0.0/tileset_a/{x}/{y}/{z}.png
but no errors are added to the error log

When some of the other application generate the slippy maps we do not have
the source images so we cannot add that to the map file

What is the proper way to use the tiles generated by gdal2tiles.py with
mapserver?

Bruce


[Attachment #5 (text/html)]

<div dir="ltr">My apologies to those on the GDAL list as well as here I posted ther a \
couple of days ago but did not get any replies.<div><br></div><div>We have tile sets \
created by gdal2tiles.py as well as from other tools.   We need to display the  tiles \
i web using frameworks such as such as cesium or worldwindjs.   We are using the \
latest mapserver from ms4w on windows 10.   iI we use seed_cache we get a tileset \
quite different from that of gdal2tiles.   we configured the mapcache.xml file for \
those datasets and they appear to work ok in QGIS.   Using the same configuration \
style for the slippy map tiles lets them show in a get capabilities but not in QGIS \
nor a simple one tile query.</div><div><br></div><div>the mapcache,xml entries are \
basicallt  as follows</div><div><br></div><div>     &lt;cache \
name=&quot;tileset_a_cache&quot; type=&quot;disk&quot;&gt;<br>        \
&lt;base&gt;C:/data_static/MapTiles&lt;/base&gt;<br>   \
&lt;/cache&gt;<br></div><div><br></div><div>   &lt;source \
name=&quot;tileset_a_src&quot; type=&quot;wms&quot;&gt;<br>   &lt;getmap&gt;<br>      \
&lt;params&gt;<br>         &lt;FORMAT&gt;image/png&lt;/FORMAT&gt;<br>         \
&lt;LAYERS&gt;TileSetA&lt;/LAYERS&gt;<br>         \
&lt;MAP&gt;/data/config/map/nasaww.map&lt;/MAP&gt;<br>      &lt;/params&gt;<br>   \
&lt;/getmap&gt;<br>   &lt;http&gt;<br>      &lt;url&gt;<a \
href="http://localhost/cgi-bin/mapserv.exe">http://localhost/cgi-bin/mapserv.exe</a>?&lt;/url&gt;<br> \
&lt;/http&gt;<br>&lt;/source&gt;<br><br>	&lt;tileset name=&quot;

tileset_a   &quot;&gt;<br>	      &lt;source&gt;

tileset_a   _src&lt;/source&gt;<br>            &lt;cache&gt;

tileset_a   _cache&lt;/cache&gt;<br>            \
&lt;grid&gt;GoogleMapsCompatible&lt;/grid&gt;<br>            \
&lt;grid&gt;g&lt;/grid&gt;<br>            &lt;format&gt;PNG&lt;/format&gt;<br>        \
&lt;metatile&gt;8 8&lt;/metatile&gt;<br>      \
&lt;/tileset&gt;<br></div><div><br></div><div><br></div><div>If I query wmts \
capabilities the dataset show in the list</div><div><br></div><div><a \
href="http://localhost/mapcache/wmts?service=wmts&amp;request=getcapabilities&amp;vers \
ion=1.0.0">http://localhost/mapcache/wmts?service=wmts&amp;request=getcapabilities&amp;version=1.0.0</a><br></div><div><br></div><div><div \
class="gmail-line" style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span \
class="gmail-html-tag">&lt;Layer&gt;</span></div><div class="gmail-opened" \
style="margin-left:1em;color:rgb(0,0,0);font-family:monospace;font-size:13px"><div \
class="gmail-line"><span \
class="gmail-html-tag">&lt;ows:Title&gt;</span>tileset_a<span \
class="gmail-html-tag">&lt;/ows:Title&gt;</span></div><div class="gmail-line"><span \
class="gmail-html-tag">&lt;ows:Identifier&gt;</span><span class="gmail-html-tag">

tileset_a   &lt;/ows:Identifier&gt;</span></div><div class="gmail-folder" \
id="gmail-folder59"><div class="gmail-line"><span class="gmail-folder-button \
gmail-fold" style="display:inline-block;width:10px;background-position:initial;backgro \
und-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;background-color:initial;vertical-align:bottom;height:10px"></span><span \
class="gmail-html-tag">&lt;Style<span class="gmail-html-attribute">  <span \
class="gmail-html-attribute-name">isDefault</span>=&quot;<span \
class="gmail-html-attribute-value">true</span>&quot;</span>&gt;</span></div><div \
class="gmail-opened" style="margin-left:1em"><div class="gmail-line"><span \
class="gmail-html-tag">&lt;ows:Identifier&gt;</span>default<span \
class="gmail-html-tag">&lt;/ows:Identifier&gt;</span></div></div><div \
class="gmail-line"><span class="gmail-html-tag">&lt;/Style&gt;</span></div></div><div \
class="gmail-line"><span class="gmail-html-tag">&lt;Format&gt;</span>image/png<span \
class="gmail-html-tag">&lt;/Format&gt;</span></div><div class="gmail-folder" \
id="gmail-folder60"><div class="gmail-line"><span class="gmail-folder-button \
gmail-fold" style="display:inline-block;width:10px;background-position:initial;backgro \
und-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;background-color:initial;vertical-align:bottom;height:10px"></span><span \
class="gmail-html-tag">&lt;TileMatrixSetLink&gt;</span></div><div \
class="gmail-opened" style="margin-left:1em"><div class="gmail-line"><span \
class="gmail-html-tag">&lt;TileMatrixSet&gt;</span>GoogleMapsCompatible<span \
class="gmail-html-tag">&lt;/TileMatrixSet&gt;</span></div></div><div \
class="gmail-line"><span \
class="gmail-html-tag">&lt;/TileMatrixSetLink&gt;</span></div></div><div \
class="gmail-folder" id="gmail-folder61"><div class="gmail-line"><span \
class="gmail-folder-button gmail-fold" \
style="display:inline-block;width:10px;background-position:initial;background-size:ini \
tial;background-repeat:initial;background-origin:initial;background-clip:initial;background-color:initial;vertical-align:bottom;height:10px"></span><span \
class="gmail-html-tag">&lt;TileMatrixSetLink&gt;</span></div><div \
class="gmail-opened" style="margin-left:1em"><div class="gmail-line"><span \
class="gmail-html-tag">&lt;TileMatrixSet&gt;</span>g<span \
class="gmail-html-tag">&lt;/TileMatrixSet&gt;</span></div></div><div \
class="gmail-line"><span \
class="gmail-html-tag">&lt;/TileMatrixSetLink&gt;</span></div></div><div \
class="gmail-line"><span class="gmail-html-tag">&lt;ResourceURL<span \
class="gmail-html-attribute">  <span \
class="gmail-html-attribute-name">format</span>=&quot;<span \
class="gmail-html-attribute-value">image/png</span>&quot;</span><span \
class="gmail-html-attribute">  <span \
class="gmail-html-attribute-name">resourceType</span>=&quot;<span \
class="gmail-html-attribute-value">tile</span>&quot;</span><span \
class="gmail-html-attribute">  <span \
class="gmail-html-attribute-name">template</span>=&quot;<span \
class="gmail-html-attribute-value"><a \
href="http://localhost/mapcache/wmts/1.0.0/tileset_a/default/{TileMatrixSet}/{TileMatr \
ix}/{TileRow}/{TileCol}.png">http://localhost/mapcache/wmts/1.0.0/tileset_a/default/{T \
ileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png</a></span>&quot;</span>/&gt;</span></div></div><div \
class="gmail-line" style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span \
class="gmail-html-tag">&lt;/Layer&gt;</span></div></div><div class="gmail-line" \
style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span \
class="gmail-html-tag"><br></span></div><div>if I add a wmts layer using the \
following in QGIS the layer shows in the list  </div><div><a \
href="http://localhost/mapcache/wmts?service=wmts&amp;request=getcapabilities&amp;vers \
ion=1.0.0">http://localhost/mapcache/wmts?service=wmts&amp;request=getcapabilities&amp;version=1.0.0</a><br></div><div><br></div><div>no \
tiles are displayed and the server error log has several entries \
of</div><div><div>WMS server error. Invalid layer(s) given in the LAYERS \
parameter.</div></div><div><br></div><div>if I try to add the tiles as andXYZ layer \
using the following no tiles are displayed</div><div><br></div><div><a \
href="http://localhost/mapcache/tms/1.0.0/tileset_a/{x}/{y}/{z}.png">http://localhost/mapcache/tms/1.0.0/tileset_a/{x}/{y}/{z}.png</a><br></div><div>but \
no errors are added to the error log</div><div><br></div><div>When some of the other \
application generate the slippy maps we do not have the source images so we cannot \
add that to the map file<br></div><div><br></div><div>What is the proper way to use \
the tiles generated by gdal2tiles.py with \
mapserver?</div><div><br></div><div>Bruce</div><div><br></div><div><br></div></div>



_______________________________________________
MapServer-dev mailing list
MapServer-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic