[josm-dev] How to if a node is mergeable?

Flávio Henrique yoshimit at gmail.com
Mon Dec 27 20:52:07 GMT 2010


Hi there.
I have data from a city that I'm working to import, but need to do a lot of
manual work before.
I need to combine the various segments (ways) onto one way, but first I have
to find out the nodes that should be merged and, then, combine the segments.

I'm playing with MergeNodesAction.java class and the changes is almost done
to do the work, but seems the code merge nodes that is not "mergeable". I
meant: when you select a node that could be referred by two or more ways,
JOSM shows it like this: http://i52.tinypic.com/21km9t5.jpg. But when you
select an "alone"-unmergeable node, JOSM shows it like this:
http://i54.tinypic.com/29glv0k.jpg.

How can I test if the node "alone" or not and call the actionPerformed
method only for those "mergeable" ?

Thank you!

Flávio Henrique
--------------------------------------------------------
"There are only 10 types of people in the world: Those who understand
binary, and those who don't"
--------------------------------------------------------


More information about the josm-dev mailing list