Changeset 9880 in josm
- Timestamp:
- 2016-02-25T00:50:30+01:00 (9 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/build.xml
r9842 r9880 619 619 <target name="taginfo" depends="dist"> 620 620 <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpath="${groovy.jar};tools/commons-cli-1.3.1.jar"/> 621 <property name="taginfoextract" value="scripts/ taginfoextract.groovy"/>621 <property name="taginfoextract" value="scripts/TagInfoExtract.groovy"/> 622 622 <property name="imgurlprefix" value="http://josm.openstreetmap.de/download/taginfo/taginfo-img"/> 623 623 <_taginfo type="mappaint" output="taginfo_style.json"/> … … 629 629 <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpath="${groovy.jar};tools/commons-cli-1.3.1.jar"/> 630 630 <echo message="Checking editor imagery difference"/> 631 <groovy src="scripts/ sync_editor_imagery_index.groovy" classpath="${dist.dir}/josm-custom.jar">631 <groovy src="scripts/SyncEditorImageryIndex.groovy" classpath="${dist.dir}/josm-custom.jar"> 632 632 <arg value="-nomissingeii"/> 633 633 </groovy> -
trunk/scripts/SyncEditorImageryIndex.groovy
r9879 r9880 29 29 import org.openstreetmap.josm.tools.Utils 30 30 31 class sync_editor_imagery_index {31 class SyncEditorImageryIndex { 32 32 33 33 List<ImageryInfo> josmEntries; … … 51 51 static main(def args) { 52 52 parse_command_line_arguments(args) 53 def script = new sync_editor_imagery_index()53 def script = new SyncEditorImageryIndex() 54 54 script.loadSkip() 55 55 script.start() -
trunk/scripts/TagInfoExtract.groovy
r9879 r9880 47 47 import org.openstreetmap.josm.tools.Utils 48 48 49 class taginfoextract {49 class TagInfoExtract { 50 50 51 51 static def options … … 187 187 static main(def args) { 188 188 parse_command_line_arguments(args) 189 def script = new taginfoextract()189 def script = new TagInfoExtract() 190 190 if (!options.t || options.t == 'mappaint') { 191 191 script.run() -
trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java
r9067 r9880 202 202 double distanceFirst = firstPosition.distance(refPoint); 203 203 double distanceSecond = secondPosition.distance(refPoint); 204 double difference = distanceFirst - distanceSecond; 205 206 if (difference > 0.0) return 1; 207 if (difference < 0.0) return -1; 208 return 0; 204 return Double.compare(distanceFirst, distanceSecond); 209 205 } 210 206 } -
trunk/src/org/openstreetmap/josm/data/osm/NodePositionComparator.java
r8393 r9880 20 20 return 0; 21 21 22 double dLat = n1.getCoor().lat() - n2.getCoor().lat(); 23 if (dLat > 0) 24 return 1; 25 if (dLat < 0) 26 return -1; 27 double dLon = n1.getCoor().lon() - n2.getCoor().lon(); 28 if (dLon == 0) 29 return 0; 30 return dLon > 0 ? 1 : -1; 22 int dLat = Double.compare(n1.getCoor().lat(), n2.getCoor().lat()); 23 return dLat != 0 ? dLat : Double.compare(n1.getCoor().lon(), n2.getCoor().lon()); 31 24 } 32 25 } -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r9850 r9880 1478 1478 1479 1479 Pair<Timezone, Offset> splitOutTimezone() { 1480 // In hours , rounded to two decimal places1481 double tz = (withoutDayOffset().getSeconds() * 100L / 3600.0) / 100.0;1480 // In hours 1481 double tz = withoutDayOffset().getSeconds() / 3600.0; 1482 1482 1483 1483 // Due to imprecise clocks we might get a "+3:28" timezone, which should obviously be 3:30 with -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java
r9804 r9880 100 100 @Override 101 101 public int compare(TrackLength l0, TrackLength l1) { 102 if (l0.value < l1.value) 103 return -1; 104 else if (l0.value > l1.value) 105 return 1; 106 return 0; 102 return Double.compare(l0.value, l1.value); 107 103 } 108 104 } -
trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImagesTest.java
r9753 r9880 11 11 import org.junit.BeforeClass; 12 12 import org.junit.Test; 13 import org.openstreetmap.josm.JOSMFixture; 13 14 import org.openstreetmap.josm.data.coor.LatLon; 14 15 import org.openstreetmap.josm.data.gpx.GpxData; … … 28 29 @BeforeClass 29 30 public static void setUp() { 31 JOSMFixture.createUnitTestFixture().init(); 30 32 DateUtilsTest.setTimeZone(TimeZone.getTimeZone("UTC")); 31 33 }
Note:
See TracChangeset
for help on using the changeset viewer.