Changeset 9214 in josm
- Timestamp:
- 2015-12-29T19:23:48+01:00 (9 years ago)
- Location:
- trunk
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/taginfoextract.groovy
r8863 r9214 120 120 121 121 def find_url(boolean generate_image) { 122 osm = new Node( new LatLon(0,0))122 osm = new Node(LatLon.ZERO) 123 123 def env = apply_stylesheet(osm) 124 124 def c = env.mc.getCascade("default") -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
r8942 r9214 360 360 // need to synthesize a download bounds lest the visual indication of downloaded area doesn't work 361 361 dataSet.dataSources.add(new DataSource(currentBounds != null ? currentBounds : 362 new Bounds( new LatLon(0, 0)), "OpenStreetMap server"));362 new Bounds(LatLon.ZERO), "OpenStreetMap server")); 363 363 } 364 364 -
trunk/src/org/openstreetmap/josm/data/imagery/OffsetBookmark.java
r8846 r9214 106 106 center = Main.getProjection().eastNorth2latlon(Main.map.mapView.getCenter()); 107 107 } else { 108 center = new LatLon(0, 0);108 center = LatLon.ZERO; 109 109 } 110 110 OffsetBookmark nb = new OffsetBookmark( -
trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java
r8909 r9214 195 195 public void setCoordinates(LatLon ll) { 196 196 if (ll == null) { 197 ll = new LatLon(0, 0);197 ll = LatLon.ZERO; 198 198 } 199 199 this.latLonCoordinates = ll; -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java
r9078 r9214 61 61 62 62 private PlayHeadMarker() { 63 super( new LatLon(0.0, 0.0), "",63 super(LatLon.ZERO, "", 64 64 Main.pref.get("marker.audiotracericon", "audio-tracer"), 65 65 null, -1.0, 0.0); -
trunk/src/org/openstreetmap/josm/io/NmeaReader.java
r8870 r9214 455 455 // return a zero latlon instead of null so it is logged as zero coordinate 456 456 // instead of malformed sentence 457 if (widthNorth.isEmpty() && lengthEast.isEmpty()) return new LatLon(0.0, 0.0);457 if (widthNorth.isEmpty() && lengthEast.isEmpty()) return LatLon.ZERO; 458 458 459 459 // The format is xxDDLL.LLLL -
trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java
r8899 r9214 39 39 private static final class SearchContext { 40 40 final DataSet ds = new DataSet(); 41 final Node n1 = new Node( new LatLon(0, 0));41 final Node n1 = new Node(LatLon.ZERO); 42 42 final Node n2 = new Node(new LatLon(5, 5)); 43 43 final Way w1 = new Way(); -
trunk/test/unit/org/openstreetmap/josm/data/BoundsTest.java
r8509 r9214 41 41 assertTrue(b3.intersects(b2)); 42 42 43 b3.extend( new LatLon(0, 0));43 b3.extend(LatLon.ZERO); 44 44 assertEquals(b3, new Bounds(0, 0, 90, -170)); 45 45 } -
trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java
r8857 r9214 81 81 @Test 82 82 public void nodeSimple_IdenticalNoConflict() { 83 Node n = new Node( new LatLon(0, 0));83 Node n = new Node(LatLon.ZERO); 84 84 n.setOsmId(1, 1); 85 85 n.setModified(false); … … 87 87 my.addPrimitive(n); 88 88 89 Node n1 = new Node( new LatLon(0, 0));89 Node n1 = new Node(LatLon.ZERO); 90 90 n1.setOsmId(1, 1); 91 91 n1.setModified(false); … … 116 116 @Test 117 117 public void nodeSimple_locallyUnmodifiedNoConflict() { 118 Node n = new Node( new LatLon(0, 0));118 Node n = new Node(LatLon.ZERO); 119 119 n.setOsmId(1, 1); 120 120 n.setModified(false); … … 122 122 my.addPrimitive(n); 123 123 124 Node n1 = new Node( new LatLon(0, 0));124 Node n1 = new Node(LatLon.ZERO); 125 125 n1.setOsmId(1, 2); 126 126 n1.setModified(false); … … 156 156 @Test 157 157 public void nodeSimple_TagConflict() { 158 Node n = new Node( new LatLon(0, 0));158 Node n = new Node(LatLon.ZERO); 159 159 n.setOsmId(1, 1); 160 160 n.setModified(true); … … 163 163 my.addPrimitive(n); 164 164 165 Node n1 = new Node( new LatLon(0, 0));165 Node n1 = new Node(LatLon.ZERO); 166 166 n1.setOsmId(1, 2); 167 167 n1.setModified(false); … … 191 191 public void nodeSimple_DeleteConflict() { 192 192 Node n = new Node(1, 1); 193 n.setCoor( new LatLon(0, 0));193 n.setCoor(LatLon.ZERO); 194 194 n.setDeleted(true); 195 195 n.put("key1", "value1"); 196 196 my.addPrimitive(n); 197 197 198 Node n1 = new Node( new LatLon(0, 0));198 Node n1 = new Node(LatLon.ZERO); 199 199 n1.setOsmId(1, 2); 200 200 n1.setModified(false); … … 221 221 @Test 222 222 public void nodeSimple_DeleteConflict_2() { 223 Node n = new Node( new LatLon(0, 0));223 Node n = new Node(LatLon.ZERO); 224 224 n.setOsmId(1, 1); 225 225 n.setDeleted(true); 226 226 my.addPrimitive(n); 227 227 228 Node n1 = new Node( new LatLon(0, 0));228 Node n1 = new Node(LatLon.ZERO); 229 229 n1.setOsmId(1, 1); 230 230 their.addPrimitive(n1); … … 307 307 308 308 Node n = new Node(); 309 n.setCoor( new LatLon(0, 0));309 n.setCoor(LatLon.ZERO); 310 310 n.put("key1", "value1"); 311 311 n.setUser(myUser); … … 315 315 316 316 Node n1 = new Node(); 317 n1.setCoor( new LatLon(0, 0));317 n1.setCoor(LatLon.ZERO); 318 318 n1.put("key1", "value1"); 319 319 cal.add(Calendar.HOUR, 1); … … 349 349 350 350 Node n1 = new Node(); 351 n1.setCoor( new LatLon(0, 0));351 n1.setCoor(LatLon.ZERO); 352 352 n1.setOsmId(1, 1); 353 353 n1.put("key1", "value1"); … … 380 380 381 381 Node n1 = new Node(); 382 n1.setCoor( new LatLon(0, 0));382 n1.setCoor(LatLon.ZERO); 383 383 n1.setOsmId(1, 1); 384 384 my.addPrimitive(n1); 385 385 386 386 Node n2 = new Node(); 387 n2.setCoor( new LatLon(0, 0));387 n2.setCoor(LatLon.ZERO); 388 388 n2.setOsmId(2, 1); 389 389 … … 399 399 // -- the source data set 400 400 401 Node n3 = new Node( new LatLon(0, 0));401 Node n3 = new Node(LatLon.ZERO); 402 402 n3.setOsmId(1, 1); 403 403 their.addPrimitive(n3); … … 452 452 // -- my data set 453 453 454 Node n1 = new Node( new LatLon(0, 0));454 Node n1 = new Node(LatLon.ZERO); 455 455 n1.setOsmId(1, 1); 456 456 my.addPrimitive(n1); … … 468 468 // --- their data set 469 469 470 Node n3 = new Node( new LatLon(0, 0));470 Node n3 = new Node(LatLon.ZERO); 471 471 n3.setOsmId(1, 1); 472 472 their.addPrimitive(n3); … … 522 522 // -- the target dataset 523 523 524 Node n1 = new Node( new LatLon(0, 0));524 Node n1 = new Node(LatLon.ZERO); 525 525 n1.setOsmId(1, 1); 526 526 my.addPrimitive(n1); … … 541 541 // -- the source dataset 542 542 543 Node n3 = new Node( new LatLon(0, 0));543 Node n3 = new Node(LatLon.ZERO); 544 544 n3.setOsmId(1, 1); 545 545 their.addPrimitive(n3); … … 585 585 public void waySimple_TheirVersionNotVisibleMyIsModified() { 586 586 587 Node mn1 = new Node( new LatLon(0, 0));587 Node mn1 = new Node(LatLon.ZERO); 588 588 mn1.setOsmId(1, 1); 589 589 my.addPrimitive(mn1); … … 630 630 // -- my data set 631 631 632 Node n1 = new Node( new LatLon(0, 0));632 Node n1 = new Node(LatLon.ZERO); 633 633 n1.setOsmId(1, 1); 634 634 my.addPrimitive(n1); … … 645 645 // -- their data set 646 646 647 Node n3 = new Node( new LatLon(0, 0));647 Node n3 = new Node(LatLon.ZERO); 648 648 n3.setOsmId(1, 1); 649 649 their.addPrimitive(n3); … … 688 688 // -- my data set 689 689 690 Node n1 = new Node( new LatLon(0, 0));690 Node n1 = new Node(LatLon.ZERO); 691 691 my.addPrimitive(n1); 692 692 … … 701 701 // -- their data set 702 702 703 Node n3 = new Node( new LatLon(0, 0));703 Node n3 = new Node(LatLon.ZERO); 704 704 their.addPrimitive(n3); 705 705 … … 744 744 // -- my dataset 745 745 746 Node mn1 = new Node( new LatLon(0, 0));746 Node mn1 = new Node(LatLon.ZERO); 747 747 mn1.setOsmId(1, 1); 748 748 mn1.setDeleted(true); 749 749 my.addPrimitive(mn1); 750 750 751 Node tn1 = new Node( new LatLon(0, 0));751 Node tn1 = new Node(LatLon.ZERO); 752 752 tn1.setOsmId(1, 1); 753 753 their.addPrimitive(tn1); … … 797 797 public void relationComplex_mergingADeletedNode() { 798 798 799 Node mn1 = new Node( new LatLon(0, 0));799 Node mn1 = new Node(LatLon.ZERO); 800 800 mn1.setOsmId(1, 1); 801 801 mn1.setDeleted(true); … … 803 803 804 804 805 Node tn1 = new Node( new LatLon(0, 0));805 Node tn1 = new Node(LatLon.ZERO); 806 806 tn1.setOsmId(1, 1); 807 807 their.addPrimitive(tn1); … … 903 903 their.addPrimitive(w3); 904 904 905 Node n4 = new Node( new LatLon(0, 0));905 Node n4 = new Node(LatLon.ZERO); 906 906 n4.setOsmId(1, 1); 907 907 my.addPrimitive(n4); -
trunk/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java
r8857 r9214 40 40 public void basic() throws ParseError { 41 41 DataSet ds = new DataSet(); 42 Node n1 = new Node( new LatLon(0, 0));42 Node n1 = new Node(LatLon.ZERO); 43 43 n1.put("amenity", "parking"); 44 Node n2 = new Node( new LatLon(0, 0));44 Node n2 = new Node(LatLon.ZERO); 45 45 n2.put("fixme", "continue"); 46 46 ds.addPrimitive(n1); -
trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveKeyHandlingTest.java
r8857 r9214 119 119 public void hasEqualSemanticAttributes() { 120 120 Node n1 = new Node(1); 121 n1.setCoor( new LatLon(0, 0));121 n1.setCoor(LatLon.ZERO); 122 122 n1.put("key.1", "value.1"); 123 123 n1.put("key.2", "value.2"); 124 124 125 125 Node n2 = new Node(1); 126 n2.setCoor( new LatLon(0, 0));126 n2.setCoor(LatLon.ZERO); 127 127 n2.put("key.2", "value.2"); 128 128 n2.put("key.1", "value.1"); … … 137 137 public void hasEqualSemanticAttributes_2() { 138 138 Node n1 = new Node(1); 139 n1.setCoor( new LatLon(0, 0));139 n1.setCoor(LatLon.ZERO); 140 140 n1.put("key.1", "value.1"); 141 141 n1.put("key.2", "value.3"); 142 142 143 143 Node n2 = new Node(1); 144 n2.setCoor( new LatLon(0, 0));144 n2.setCoor(LatLon.ZERO); 145 145 n2.put("key.1", "value.1"); 146 146 n2.put("key.2", "value.4"); -
trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveTest.java
r8857 r9214 40 40 @Test 41 41 public void simpleReferrersTest() { 42 Node n1 = new Node( new LatLon(0.0, 0.0));42 Node n1 = new Node(LatLon.ZERO); 43 43 Way w1 = new Way(); 44 44 w1.addNode(n1); … … 50 50 @Test 51 51 public void addAndRemoveReferrer() { 52 Node n1 = new Node( new LatLon(0.0, 0.0));53 Node n2 = new Node( new LatLon(0.0, 0.0));52 Node n1 = new Node(LatLon.ZERO); 53 Node n2 = new Node(LatLon.ZERO); 54 54 Way w1 = new Way(); 55 55 w1.addNode(n1); … … 66 66 @Test 67 67 public void multipleReferrers() { 68 Node n1 = new Node( new LatLon(0.0, 0.0));68 Node n1 = new Node(LatLon.ZERO); 69 69 Way w1 = new Way(); 70 70 Way w2 = new Way(); … … 82 82 @Test 83 83 public void removeMemberFromRelationReferrerTest() { 84 Node n1 = new Node( new LatLon(0, 0));84 Node n1 = new Node(LatLon.ZERO); 85 85 Relation r1 = new Relation(); 86 86 r1.addMember(new RelationMember("", n1)); … … 94 94 @Test 95 95 public void setRelationMemberReferrerTest() { 96 Node n1 = new Node( new LatLon(0, 0));97 Node n2 = new Node( new LatLon(0, 0));96 Node n1 = new Node(LatLon.ZERO); 97 Node n2 = new Node(LatLon.ZERO); 98 98 Relation r1 = new Relation(); 99 99 Relation r2 = new Relation(); … … 111 111 @Test 112 112 public void removePrimitiveReferrerTest() { 113 Node n1 = new Node( new LatLon(0.0, 0.0));113 Node n1 = new Node(LatLon.ZERO); 114 114 Way w1 = new Way(); 115 115 w1.addNode(n1); … … 134 134 public void nodeFromMultipleDatasets() { 135 135 // n has two referrers - w1 and w2. But only w1 is returned because it is in the same dataset as n 136 Node n = new Node( new LatLon(0.0, 0.0));136 Node n = new Node(LatLon.ZERO); 137 137 138 138 Way w1 = new Way(); -
trunk/test/unit/org/openstreetmap/josm/data/osm/WaySegmentTest.java
r8997 r9214 20 20 public void testForNodePair() throws Exception { 21 21 final DataSet ds = new DataSet(); 22 final Node n1 = new Node( new LatLon(0, 0));22 final Node n1 = new Node(LatLon.ZERO); 23 23 final Node n2 = new Node(new LatLon(1, 0)); 24 24 final Node n3 = new Node(new LatLon(2, 0)); -
trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryNodeTest.java
r9203 r9214 39 39 4L, // changesetId 40 40 d, // timestamp 41 new LatLon(0, 0)41 LatLon.ZERO 42 42 ); 43 43 } -
trunk/test/unit/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitorTest.java
r8857 r9214 165 165 Relation r1 = new Relation(1, 1); 166 166 Node n20 = new Node(20, 1); 167 n20.setCoor( new LatLon(0, 0));167 n20.setCoor(LatLon.ZERO); 168 168 r1.addMember(new RelationMember("node-20", n20)); 169 169 Way w30 = new Way(30, 1); -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/HighwaysTest.groovy
r8941 r9214 18 18 def ds = new DataSet() 19 19 20 def n00 = new Node( new LatLon(0, 0))20 def n00 = new Node(LatLon.ZERO) 21 21 def n10 = new Node(new LatLon(1, 0)) 22 22 def n20 = new Node(new LatLon(2, 0)) -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/SimilarNamedWaysTest.groovy
r7938 r9214 23 23 def ds = new DataSet() 24 24 25 def n00 = new Node( new LatLon(0, 0))25 def n00 = new Node(LatLon.ZERO) 26 26 def n10 = new Node(new LatLon(1, 0)) 27 27 def n20 = new Node(new LatLon(2, 0)) -
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ChildOrParentSelectorTest.groovy
r8833 r9214 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.gui.mappaint.mapcss 3 4 import org.openstreetmap.josm.data.osm.OsmPrimitiveType5 import org.openstreetmap.josm.gui.mappaint.MultiCascade6 import org.openstreetmap.josm.io.OsmReader7 3 8 4 import java.util.logging.Logger … … 13 9 import org.openstreetmap.josm.data.osm.DataSet 14 10 import org.openstreetmap.josm.data.osm.Node 11 import org.openstreetmap.josm.data.osm.OsmPrimitiveType 15 12 import org.openstreetmap.josm.data.osm.Relation 16 13 import org.openstreetmap.josm.data.osm.RelationMember 17 14 import org.openstreetmap.josm.data.osm.Way 18 15 import org.openstreetmap.josm.gui.mappaint.Environment 16 import org.openstreetmap.josm.gui.mappaint.MultiCascade 19 17 import org.openstreetmap.josm.gui.mappaint.mapcss.Selector.ChildOrParentSelector 18 import org.openstreetmap.josm.io.OsmReader 20 19 21 20 class ChildOrParentSelectorTest { … … 44 43 def node(id) { 45 44 def n = new Node(id,1) 46 n.setCoor( new LatLon(0,0))45 n.setCoor(LatLon.ZERO) 47 46 ds.addPrimitive(n) 48 47 return n -
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/KeyConditionTest.groovy
r8415 r9214 38 38 def node(id) { 39 39 def n = new Node(id,1) 40 n.setCoor( new LatLon(0,0))40 n.setCoor(LatLon.ZERO) 41 41 ds.addPrimitive(n) 42 42 return n -
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/KeyValueConditionTest.groovy
r8874 r9214 40 40 def node(id) { 41 41 def n = new Node(id,1) 42 n.setCoor( new LatLon(0,0))42 n.setCoor(LatLon.ZERO) 43 43 ds.addPrimitive(n) 44 44 return n -
trunk/test/unit/org/openstreetmap/josm/io/OsmChangeBuilderTest.groovy
r8510 r9214 43 43 // should be OK 44 44 builder.start() 45 Node n = new Node( new LatLon(0,0))45 Node n = new Node(LatLon.ZERO) 46 46 builder.append n 47 47 builder.finish() … … 73 73 def Changeset cs = new Changeset(1) 74 74 OsmChangeBuilder builder = new OsmChangeBuilder(cs) 75 Node n = new Node( new LatLon(0,0))75 Node n = new Node(LatLon.ZERO) 76 76 77 77 builder.start() … … 105 105 OsmChangeBuilder builder = new OsmChangeBuilder(cs) 106 106 Node n = new Node(1) 107 n.coor = new LatLon(0,0)107 n.coor = LatLon.ZERO 108 108 n.incomplete = false 109 109 n.modified = true … … 139 139 OsmChangeBuilder builder = new OsmChangeBuilder(cs) 140 140 Node n = new Node(1) 141 n.coor = new LatLon(0,0)141 n.coor = LatLon.ZERO 142 142 n.incomplete = false 143 143 n.deleted = true … … 174 174 OsmChangeBuilder builder = new OsmChangeBuilder(cs) 175 175 Node n1 = new Node(1) 176 n1.coor = new LatLon(0,0)176 n1.coor = LatLon.ZERO 177 177 n1.incomplete = false 178 178 n1.deleted = true 179 179 180 Node n2 = new Node( new LatLon(0,0))180 Node n2 = new Node(LatLon.ZERO) 181 181 182 182 Node n3 = new Node(2) 183 n3.coor = new LatLon(0,0)183 n3.coor = LatLon.ZERO 184 184 n3.incomplete = false 185 185 n3.modified = true
Note:
See TracChangeset
for help on using the changeset viewer.