[gdal-dev] MVT tileset with limited output extent

Rahkonen Jukka jukka.rahkonen at maanmittauslaitos.fi
Wed Dec 20 07:17:16 PST 2023


Hi,

Have you tried -sql? Like -sql “select * from table where st_intersects(geom,reference_geom)”.

-Jukka Rahkonen-

Lähettäjä: gdal-dev <gdal-dev-bounces at lists.osgeo.org> Puolesta Jan Wolski via gdal-dev
Lähetetty: keskiviikko 20. joulukuuta 2023 17.07
Vastaanottaja: gdal-dev at lists.osgeo.org
Aihe: Re: [gdal-dev] MVT tileset with limited output extent

Thanks for the reply.

I can see how spatially filtering the input (-spat) is useful, but I don't want to clip the geometries (other than clipping by tile edges that MVT driver does by default). What I'm after is spatial filtering of the output tiles based on each tile extent.

So to further clarify, I could do the translation using -spat <ROI> and then iterate over all of the generated MVT files and delete the ones whose tile extent does not intersect with <ROI>. But that would waste resources in a big way.

Thanks,
Jan Wolski

On Tue, Dec 5, 2023 at 4:05 PM Even Rouault <even.rouault at spatialys.com<mailto:even.rouault at spatialys.com>> wrote:

You can use the -spat + (-clipsrc or -clipdst) switches of ogr2ogr
Le 05/12/2023 à 14:57, Jan Wolski via gdal-dev a écrit :
Hi,

I'm creating MVT tilesets for the ETRS-TM35FIN tiling scheme using GDAL/OGR. I'm prototyping with ogr2ogr but later I will be using Python bindings to create the production workflow.

Is there a way to limit the geographic extent of where the MVT driver creates tiles? By default it seems to create all tiles that intersect any input feature. I would like to create only tiles that intersect a given extent. This is to enable partial update of a MVT tileset.

This is the ogr2ogr command I have now:

ogr2ogr -f MVT stand MV_R5232B.gpkg stand -dsco "MAXZOOM=11" -dsco "MINZOOM=8" -dsco "TILE_EXTENSION=mvt" -dsco "TILING_SCHEME=EPSG:3067,-548576,8388608,2097152" -dsco "TYPE=overlay" -dsco "COMPRESS=NO"


Thanks,
Jan Wolski


_______________________________________________

gdal-dev mailing list

gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>

https://lists.osgeo.org/mailman/listinfo/gdal-dev

--

http://www.spatialys.com<http://www.spatialys.com/>

My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20231220/a35e578a/attachment-0001.htm>


More information about the gdal-dev mailing list