From e61fd88fe81363d8f84e8f9c42b52c64314c4286 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sat, 19 Oct 2024 16:27:53 +0200 Subject: webmap-publish: Flatten geometry to 2D before exporting. The webmap ignores elevation, so we might as well flatten geometries to save space. --- webmap-publish | 1 + 1 file changed, 1 insertion(+) diff --git a/webmap-publish b/webmap-publish index 36bed88..1c1e9a2 100755 --- a/webmap-publish +++ b/webmap-publish @@ -302,6 +302,7 @@ def exportLayer(lyr_dst, lyr_src, srs=None, clip=None, layername=None, geom = feature.GetGeometryRef().Clone() if ct is not None and geom.Transform(ct) != ogr.OGRERR_NONE: raise Exception('Could not apply coordinate transformation') + geom.FlattenTo2D() if metadata is not None: # serialize the feature to JSON and save it -- cgit v1.2.3