Skip to content

Commit

Permalink
Allow geometries to extend a bit more past their prospective parents (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
vikoivun authored May 8, 2020
1 parent 47a6d80 commit d5157bc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion munigeo/importer/helsinki.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,12 @@ def _import_division(self, muni, div, type_obj, syncher, parent_dict, feat):
if not geom.intersects(parent_geom):
continue
area = (geom - parent.geometry.boundary).area
if area > 1e-6:
# We allow a bit of extension (300 m^2) outside the parent
# as subdivision geometry boundaries don't always match perfectly
# with their parents.
# 300m^2 is a bit more than the largest error in current
# data (254m^2)
if area > 300:
continue
parents.append(parent)
parents = sorted(parents)
Expand Down

0 comments on commit d5157bc

Please sign in to comment.