Skip to content

Commit 273ce3b

Browse files
committed
Fix: Handle case where raster-union gen is used without group-by
Fixes #2443
1 parent c51bb83 commit 273ce3b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/gen/gen-tile-raster.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,13 @@ void gen_tile_raster_union_t::process(tile_t const &tile)
237237
timer(m_timer_write).start();
238238
for (auto const &geom : geometries) {
239239
auto const wkb = geom_to_ewkb(geom);
240-
connection().exec_prepared("insert_geoms", binary_param_t{wkb},
241-
tile.x(), tile.y(), param);
240+
if (with_group_by()) {
241+
connection().exec_prepared("insert_geoms", binary_param_t{wkb},
242+
tile.x(), tile.y(), param);
243+
} else {
244+
connection().exec_prepared("insert_geoms", binary_param_t{wkb},
245+
tile.x(), tile.y());
246+
}
242247
}
243248
timer(m_timer_write).stop();
244249
log_gen("Inserted {} generalized polygons", geometries.size());

0 commit comments

Comments
 (0)