transform feature property
Opened this issue · 0 comments
farfromrefug commented
I use tippecanoe to generate contours line.
I use gdal_contour -i 10 -a ele
to generate the geojson to pass to tippecanoe.
I also need to use ogr2ogr to transform
the ele
to div
as such:
ogr2ogr -dialect sqlite -sql "
SELECT
ele,
CASE
WHEN ele % 1000 = 0 THEN 1000
WHEN ele % 500 = 0 THEN 500
WHEN ele % 250 = 0 THEN 250
WHEN ele % 200 = 0 THEN 200
WHEN ele % 100 = 0 THEN 100
WHEN ele % 50 = 0 THEN 50
WHEN ele % 20 = 0 THEN 20
ELSE 10
END AS div,
geom
FROM
contour
" /vsigzip/$name-contours-10m.geojson $name-contours-4326-10m.gpkg
Now ogr2ogr is really slow and also prevent me from using tippecanoe in "parallel".
I was wondering if there was a way to get rid of the ogr2ogr step. Is there any way to transform feature properties in tippecanoe (before filtering) so that ele would become the modulo div?
Thanks