Merge pull request #2444 from joto/fix-tile-gen

Fix: Handle case where raster-union gen is used without group-by
This commit is contained in:
Sarah Hoffmann
2026-01-06 14:52:52 +01:00
committed by GitHub

View File

@ -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());