tandon created this revision. tandon added reviewers: rahn, nienhueser. tandon added subscribers: Marble, nienhueser. tandon set the repository for this revision to rMARBLE Marble.
REVISION SUMMARY Uses DBSCAN <https://en.wikipedia.org/wiki/DBSCAN> clustering algorithm to identify building clusters and then merges these clusters using QPolygonF::united() method. However, the buildings are not getting correctly written in the output OSM file. We are getting buildings of the form > <way id="237536278" changeset="31318507" timestamp="2015-05-20T15:41:52Z" uid="35468" user="Blunauer" version="2" visible="true"> > > <tag k="building" v="yes"/> > <nd ref="2454247856"/> > <nd ref="3530939281"/> > <nd ref="0"/> > <nd ref="0"/> > <nd ref="0"/> > <nd ref="0"/> > <nd ref="0"/> > <nd ref="0"/> > <nd ref="0"/> > <nd ref="0"/> > <nd ref="0"/> > <nd ref="0"/> > <nd ref="0"/> > <nd ref="1251325411"/> > <nd ref="0"/> > <nd ref="0"/> > <nd ref="0"/> > <nd ref="2454247856"/> > </way> I suspect that it might be due to OsmWriters since I checked the generated GeoDataPlacemark of merged buildings and these were having legitimate longitude, latitude values. Also, the regionQuery() method, which queries neighboring buildings for cluster formation purposes, has a runtime of O(n) due to which our clustering takes O(n*n) time. As discussed with @nienhueser, Once we get the output right i.e. correctly merged buildings , regionQuery() can be optimized by using Quadtrees or R-Trees. REPOSITORY rMARBLE Marble REVISION DETAIL https://phabricator.kde.org/D2376 AFFECTED FILES tools/osm-simplify/BuildingBlock.cpp tools/osm-simplify/BuildingBlock.h tools/osm-simplify/BuildingCluster.cpp tools/osm-simplify/BuildingCluster.h tools/osm-simplify/BuildingDensityClustering.cpp tools/osm-simplify/BuildingDensityClustering.h tools/osm-simplify/BuildingMerger.cpp tools/osm-simplify/BuildingMerger.h tools/osm-simplify/CMakeLists.txt tools/osm-simplify/TagsFilter.h tools/osm-simplify/main.cpp EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To: tandon, rahn, nienhueser Cc: nienhueser, #marble, marble-devel
