From 9e2cedc18a4edfe280be76d698d5523f98506de8 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 9 Jan 2024 12:16:15 +0100 Subject: ✨ sheet map: display buffer - 🐛 sheet map: fix 2d point display MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/models_common.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ishtar_common/models_common.py') diff --git a/ishtar_common/models_common.py b/ishtar_common/models_common.py index c8686d7b3..e4438be43 100644 --- a/ishtar_common/models_common.py +++ b/ishtar_common/models_common.py @@ -2430,9 +2430,9 @@ class GeoVectorData(Imported, OwnPerms): if dim == 3: coordinates.append(point.z) else: - if self.point_2d and dim == 2: + if self.point_2d: geom = self.point_2d - elif self.point_3d and dim == 3: + elif self.point_3d: geom = self.point_3d elif self.multi_points: geom = self.multi_points.centroid @@ -2639,6 +2639,8 @@ class GeoVectorData(Imported, OwnPerms): round(coord, precision) for coord in feature["geometry"]["coordinates"] ] + if self.buffer: + feature["properties"]["buffer"] = self.buffer geojson_dct["features"] = features try: geojson_dct["link_template"] = simple_link_to_window(self).replace( -- cgit v1.2.3