mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 13:23:59 +00:00
[editor] compare coordinates with tolerance and in WGS 84
Signed-off-by: map-per <map-per@gmx.de>
This commit is contained in:
@@ -647,7 +647,11 @@ void Editor::UploadChanges(string const & oauthToken, ChangesetTags tags, Finish
|
||||
try
|
||||
{
|
||||
XMLFeature osmFeature = changeset.GetMatchingNodeFeatureFromOSM(objCreateData.mercator);
|
||||
if (objCreateData.mercator == osmFeature.GetMercatorCenter())
|
||||
|
||||
// precision of OSM coordinates (WGS 84), ~= 1 cm
|
||||
constexpr double tolerance = 0.0000001;
|
||||
|
||||
if (AlmostEqualAbs(feature.GetCenter(), osmFeature.GetCenter(), tolerance))
|
||||
{
|
||||
changeset.AddChangesetTag("info:merged_same_location", "yes");
|
||||
feature = osmFeature;
|
||||
|
||||
Reference in New Issue
Block a user