[gdal-dev] gdal2tiles.py generating tiles not the same way WMS Leaflet does
Eduardo Kanegae
eduardo.kanegae at gmail.com
Wed Apr 8 13:07:29 PDT 2020
hi there,
I'm running MapServer 7.0.6 on CentOS 6.10 and GDAL 2.2.1
*https://drive.google.com/drive/folders/1PumcXf4wNcwpV_XmvjVuH5IZrgfMiNxl
- reference images
I've created a MapServer WMS service which deploys (EPSG:3857) fine
when using Leaflet 1.6.0 WMS layer using tiled option
*image 01-wmsTiles-level10.png - my leaflet application rendering the
tile WMS url. Level 10. Red lines were put for debuging purposes using
CSS
*image 02-osmTiles-level10.png - same application view but choosing
OpenStreetMap background
*image 03-gdalTiles-level10.png - the same view, level 10, of
generated http://myserver/tilelayers/mylayer/leaflet.html application.
Which seams so different of image 01. Sounds like is generating level
12 then stretching things to level 10
*image 04-osmTiles-level10.png - same leaflet.html application and
view, but choosing OSM as background
Here's my XML wms file definition for GDAL:
<GDAL_WMS>
<Service name="WMS">
<Version>1.1.1</Version>
<ServerUrl>http://myserver/mywmsservice?</ServerUrl>
<SRS>EPSG:3857</SRS>
<ImageFormat>image/png</ImageFormat>
<Transparent>TRUE</Transparent>
<Layers>basemap</Layers>
</Service>
<DataWindow>
<UpperLeftX>-5291861.4255343209952116</UpperLeftX>
<UpperLeftY>-2562821.3254362149164081</UpperLeftY>
<LowerRightX>-5194657.2461736341938376</LowerRightX>
<LowerRightY>-2660014.5294833723455667</LowerRightY>
<TileLevel>10</TileLevel>
</DataWindow>
<BandsCount>4</BandsCount>
<ZeroBlockOnServerException>true</ZeroBlockOnServerException>
</GDAL_WMS>
*DataWindow extent values from *Layer / Properties / Information*
option of QGIS 3.4.15, accessing the same WMS url
- gdal command I'm using is:
gdal2tiles.py -e -s EPSG:3857 -z 10 -v -u
"http://myserver/tilelayers/mylayer/" -w leaflet -t "mylayer"
myxmlfile.xml "/var/www/html/tilelayers/mytmslayer/"
Thanks in advance for any help.
Eduardo Patto Kanegae
http://www.webmapit.com.br | @webmapit
More information about the gdal-dev
mailing list