Repository navigation
Optimize dissolve_and_inherit_attributes and reduce_nearby_points_by_selecting - #174
Merged
Merged
Conversation
rnousia
approved these changes
Oct 22, 2026
JuhoErvasti
force-pushed
the
perf-buildings
branch
from
October 22, 2026 11:42
3daaa40 to
e471e39
Compare
(renamed from group_geometries_by_intersection_recursively)
get rid of inherit_from parameter, i don't see "min_id" being useful ever
JuhoErvasti
force-pushed
the
perf-buildings
branch
from
October 22, 2026 11:54
e471e39 to
5498e10
Compare
priority was not used anywhere
JuhoErvasti
force-pushed
the
perf-buildings
branch
from
October 22, 2026 12:45
5498e10 to
5786ec0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Mainly targeting
GeneralizeBuildings. Main culprits weredissolve_and_inherit_attributes(andgroup_geometries_by_intersections_recursively) andreduce_nearby_points_by_selectingwhich are now optimized. The single largest remaining bottleneck issimplify_building_ruaswhich we can't directly affect (without writing our own implementation of it).API changes:
dissolve_and_inherit_attributes: removeinherit_fromparameter, instead hard-code "most_intersection" optionreduce_nearby_points_by_selecting:priority_column, again this was not being used anywherereference_points_gdfas a keyword argument; this is more in line with the library API generallygroup_geometries_by_intersections_recursively:group_intersecting_geometriesBenchmark Change Report
Comparing
perf-buildingsagainstmain(Threshold ±25.0)Buildings:
test_generalize_buildings_50ktest_generalize_buildings_100kOthers:
test_generalize_landcovertest_dissolve_polygonstest_generalize_building_areastest_generalize_conservation_areas** This is misleading; the
dissolve_and_inherit_attributesimprovement probably improved things slightly, but I also reduced the amount of test data.Type of change
Bug fix
New feature
Other
Non-breaking change
Breaking change
Developer checklist