[postgis-users] Fwd: gdal2tiles - re-generate tiles only for updated regions of a map

Eduardo Kanegae eduardo.kanegae at gmail.com
Tue Apr 13 08:29:06 PDT 2021


note: I sent this to GDAL list, but maybe is more about PostGIS than gdal .
.

I'm running MapServer 7 and GDAL 2.2.1, using gdal2tiles for tile
generation tilesets for Leaflet applications.
XML files was defined as WMS datasource for gdal2tiles scripts which
contains XML/DataWindow parameters for the whole extent for the
WMS/MapServer map. A XML file is defined for each zoom level to be rendered.

Most of layers, do not have many frequent geometry updates - such as
rivers, bridges, blocks. But street lines or bus stops, sometimes have
geometry updates that could change the location of a bus stop or the
length/shape of a given street line part.

Before the tiling process, current street line layer and the new street
line layer( containing line changes or new lines or deleted ones) will be
stored in PostGIS database. Then, using spatial PostGIS functions I think
will be fine on finding locations wich contains changed objects.

But how could I update my entire tileset (from 10 to 19 zoom level) without
running re-tiling process for all zoom levels? I'd like to update only the
tile blocks which really contains updated objects.

ST_TileEnvelope could be a help for that?

thanks for any help.

Eduardo Patto Kanegae
http://www.webmapit.com.br | @webmapit

---XML
<GDAL_WMS>
<Service name="WMS">
        <Version>1.1.1</Version>
        <ServerUrl>http://myserver/myservoce?</ServerUrl>
        <SRS>EPSG:3857</SRS>
        <ImageFormat>image/png</ImageFormat>
        <Transparent>TRUE</Transparent>
        <Layers>layers2render</Layers>
</Service>
<DataWindow>
<UpperLeftX>-5260672.7616002392023802</UpperLeftX>
        <UpperLeftY>-2598374.5154764326289296</UpperLeftY>
        <LowerRightX>-5210889.5665233032777905</LowerRightX>
<LowerRightY>-2640567.8293181271292269</LowerRightY>
<SizeX>716</SizeX><SizeY>602</SizeY>
</DataWindow>
 <BandsCount>4</BandsCount>
 <ZeroBlockOnServerException>true</ZeroBlockOnServerException>
</GDAL_WMS>

--- script
gdal2tiles.py -s EPSG:3857 -z 10 -v  -u
http://myserver/tilelayers/layers2render -t
"/var/www/html/tilelayers/newlayer/" $wms_xmlfile
/var/www/html/tilelayers/$outputlayer/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20210413/40d3ced9/attachment.html>


More information about the postgis-users mailing list