From 273ce3b3a0cdc0d2fbfdc213fa50cde5dfc32bcf Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Tue, 6 Jan 2026 10:12:08 +0100 Subject: [PATCH] Fix: Handle case where raster-union gen is used without group-by Fixes #2443 --- src/gen/gen-tile-raster.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gen/gen-tile-raster.cpp b/src/gen/gen-tile-raster.cpp index b22e929e5..6a5def857 100644 --- a/src/gen/gen-tile-raster.cpp +++ b/src/gen/gen-tile-raster.cpp @@ -237,8 +237,13 @@ void gen_tile_raster_union_t::process(tile_t const &tile) timer(m_timer_write).start(); for (auto const &geom : geometries) { auto const wkb = geom_to_ewkb(geom); - connection().exec_prepared("insert_geoms", binary_param_t{wkb}, - tile.x(), tile.y(), param); + if (with_group_by()) { + connection().exec_prepared("insert_geoms", binary_param_t{wkb}, + tile.x(), tile.y(), param); + } else { + connection().exec_prepared("insert_geoms", binary_param_t{wkb}, + tile.x(), tile.y()); + } } timer(m_timer_write).stop(); log_gen("Inserted {} generalized polygons", geometries.size());