db geom improvement and clustering fixes