Add a protected method bool equals(const GeoDataGeometry &other) const to GeoDataGeometry. It should check whether extrude and altitudeMode are equal. Make it possible to check for equality using operator== in the following classes: - GeoDataPoint (first check GeoDataGeometry::equals(), then the coordinates) - GeoDataLineString (first check GeoDataGeometry::equals(), tesselate() and size(), afterwards iterate over all points and check them. If one differs, return false) - GeoDataLinearRing (same as line string, but check isClosed() as well) - GeoDataPolygon (first check GeoDataGeometry::equals(), isClosed(), tesselate(), outerBoundary(), each of innerBoundaries()) Add unit test method to tests/TestEquality for each of the classes. Make sure to compile Marble with the following cmake options enabled: BUILD_MARBLE_TESTS=TRUE, BUILD_MARBLE_TOOLS=TRUE. Execute tests/TestEquality and make sure no errors come up. Use tools/kml2kml to analyze errors and fix the tag writers, if needed. Submit a review request at https://git.reviewboard.kde.org with the marble group as reviewers. Please leave a comment here (e.g. "I want to work on this task.") if you start working on this task to avoid multiple people working on it at the same time.
I want to work on this task.
Git commit b098a5cba497e59966b0e83ca7414eae33824072 by Dennis Nienhüser, on behalf of Cruceru Calin-Cristian. Committed on 05/03/2014 at 17:14. Pushed by nienhueser into branch 'master'. Equality operators for GDPoint, GDLineString, GDLinearRing, GDPolygon REVIEW: 116553 M +6 -0 src/lib/marble/geodata/data/GeoDataGeometry.cpp M +3 -0 src/lib/marble/geodata/data/GeoDataGeometry.h M +28 -0 src/lib/marble/geodata/data/GeoDataLineString.cpp M +7 -0 src/lib/marble/geodata/data/GeoDataLineString.h M +11 -0 src/lib/marble/geodata/data/GeoDataLinearRing.cpp M +9 -0 src/lib/marble/geodata/data/GeoDataLinearRing.h M +11 -0 src/lib/marble/geodata/data/GeoDataPoint.cpp M +3 -0 src/lib/marble/geodata/data/GeoDataPoint.h M +27 -0 src/lib/marble/geodata/data/GeoDataPolygon.cpp M +7 -0 src/lib/marble/geodata/data/GeoDataPolygon.h M +180 -0 tests/TestEquality.cpp http://commits.kde.org/marble/b098a5cba497e59966b0e83ca7414eae33824072