Skip to content

Commit

Permalink
dont divide area by 10 when adding polygons - not sure why this was e…
Browse files Browse the repository at this point in the history
…ven there. Also catch a bug which hasnt surfaced so far: when area is not used, still compute if for the box id intersection test
  • Loading branch information
patrickbr committed Apr 2, 2024
1 parent 8c66cdb commit 81870ed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/spatialjoin/Sweeper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,12 @@ void Sweeper::add(const util::geo::I32Polygon& poly, const std::string& gid,
size_t subid) {
const auto& box = util::geo::getBoundingBox(poly);
const I32XSortedPolygon spoly(poly);
double areaSize = 0;
if (_cfg.useArea) areaSize = util::geo::area(poly) / 10.0;
double areaSize = util::geo::area(poly);
BoxIdList boxIds;
if (_cfg.useBoxIds) boxIds = packBoxIds(getBoxIds(spoly, poly, box, areaSize));

if (!_cfg.useArea) areaSize = 0;

size_t id = _areaCache.add(Area{
spoly,
box,
Expand Down

0 comments on commit 81870ed

Please sign in to comment.