Opened 13 years ago
Closed 13 years ago
#6696 closed enhancement (fixed)
[PATCH] Another way of computing merged node location
Reported by: | *Martin* | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | Cc: |
Description
Hello
I've implemented third way how to compute location of the merged node. Please see my attached patch.
- First way is to use location of the last selected node.
- Second way is to average locations of all selected nodes.
- Third way is to do weighted average where nearby nodes have lower weight than remote.
This behavior can be controlled by merge-nodes.mode
property (0, 1, 2). I would like to create a GUI control in preferences to enable its easy setup, but I am not sure what tab should it belong to.
Attachments (3)
Change History (9)
by , 13 years ago
Attachment: | merge.patch added |
---|
comment:1 by , 13 years ago
Summary: | Another way of computing merged node location → [PATCH] Another way of computing merged node location |
---|
comment:2 by , 13 years ago
You cannot do average on lat/lon coordinates, use EastNorth space or 3D instead.
What is the weighted average supposed to do, exactly?
follow-up: 4 comment:3 by , 13 years ago
You cannot do average on lat/lon coordinates, use EastNorth space or 3D instead.
Could you please help me with this? For two nodes I am able to find the formula but for more than two I am not successful. In any case results are very good for small distances (eg. 100km and less).
Visual example, (.) represents node:
Classic merge:
Input : ... . Result: .
Weighted merge:
Input : ... . Result: .
comment:4 by , 13 years ago
Replying to Martin Ždila <m.zdila@…>:
You cannot do average on lat/lon coordinates, use EastNorth space or 3D instead.
Could you please help me with this?
Should be easy: Just use candidates.get(i).getEastNorth(); and new Node(EastNorth en).
In any case results are very good for small distances (eg. 100km and less).
But still, it just looks wrong. :-)
Visual example, (.) represents node:
Classic merge:
Input : ... . Result: .Weighted merge:
Input : ... . Result: .
the patch