Hi,

add -preserve_fid to your ogr2ogr command line. On reading, you'll see it in the mvt_id field (on reading it is not set as a OGR feature id, since a given OGR feature can be split among several tiles, leading to several features when reading back, hence it is exposed as an attribute field to make sure the unicity of the OGR feature id)

Even

Le 25/11/2023 à 14:47, OpenDEM via gdal-dev a écrit :
Can someone please tell me how to prepare the data for the creation of MVT vector tiles with a fid?

ogr2ogr -f MVT outputfolder input.geojson (or PostGIS or ...) -dsco MINZOOM=0 -dsco MAXZOOM=6 -dsco COMPRESS=NO

Best regards,

Martin

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

--
http://www.spatialys.com
My software is free, but my time generally not.

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

Reply via email to