[Differential] [Updated, 5,617 lines] D2376: Added module to merge buildings
tandon (Akshat Tandon)
noreply at phabricator.kde.org
Sun Aug 14 22:44:28 UTC 2016
tandon updated this revision to Diff 5914.
tandon marked an inline comment as done.
tandon added a comment.
This patch contains fixes for 2 of the 3 major problems,
-It fixes the appearance of star shaped aberrations in the output osm file.
-It fixes the bug which caused loss in detail of merged buildings
@nienhueser suggested the fix for the star shaped aberrations on the lines of http://gis.stackexchange.com/a/60253 .
However, this fix involves buffering/offsetting the polygon. Since implementing offsetting algorithm is not trivial, Clipper(http://www.angusj.com/delphi/clipper.php) library was used so as to provide the buffer functionality.
The loss in detail of merged buildings was due to precision problems in QPolygonF::united()
This was fixed by scaling the nodes of the polygon by a factor of 10000000 and then scaling them down by the same factor.
However, the 3rd problem - loss of some buildings in the final output still persists and in fact has been aggravated by the buffering. Since merging the buildings now involves buffferings, some of the buildings get merged with their neighboring buildings but when the merged polygon is buffered negatively, it results in loss of buildings.
I have tried to correct this by testing the algorithm for different scale values taken for buffering but still this problem persists.
REPOSITORY
rMARBLE Marble
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D2376?vs=5752&id=5914
REVISION DETAIL
https://phabricator.kde.org/D2376
AFFECTED FILES
src/3rdparty/polyclipping/CMakeLists.txt
src/3rdparty/polyclipping/clipper.cpp
src/3rdparty/polyclipping/clipper.hpp
src/CMakeLists.txt
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/main.cpp
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: tandon, rahn, nienhueser
Cc: nienhueser, #marble, marble-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20160814/72111a3c/attachment.html>
More information about the Marble-devel
mailing list