Last change
on this file since 104 was 104, checked in by imi, 18 years ago |
- started i18n
- started "download incomplete ways" action
- added straight line selection mode
|
File size:
875 bytes
|
Line | |
---|
1 | package org.openstreetmap.josm.data.conflict;
|
---|
2 |
|
---|
3 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
4 |
|
---|
5 | import org.openstreetmap.josm.data.osm.Node;
|
---|
6 | import org.openstreetmap.josm.data.osm.OsmPrimitive;
|
---|
7 |
|
---|
8 | public class PositionConflict extends ConflictItem {
|
---|
9 |
|
---|
10 | @Override public boolean hasConflict(OsmPrimitive key, OsmPrimitive value) {
|
---|
11 | return key instanceof Node && !((Node)key).coor.equals(((Node)value).coor);
|
---|
12 | }
|
---|
13 |
|
---|
14 | @Override protected String str(OsmPrimitive osm) {
|
---|
15 | return osm instanceof Node ? ((Node)osm).coor.lat()+", "+((Node)osm).coor.lon() : null;
|
---|
16 | }
|
---|
17 |
|
---|
18 | @Override public String key() {
|
---|
19 | return "node|"+tr("position");
|
---|
20 | }
|
---|
21 |
|
---|
22 | @Override public void apply(OsmPrimitive target, OsmPrimitive other) {
|
---|
23 | if (target instanceof Node) {
|
---|
24 | ((Node)target).coor = ((Node)other).coor;
|
---|
25 | ((Node)target).eastNorth = ((Node)other).eastNorth;
|
---|
26 | }
|
---|
27 | }
|
---|
28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.