OSDN Git Service

green: magvar, speed. release_2017-07-09
authorhayashi <hayashi.yuu@gmail.com>
Sat, 8 Jul 2017 23:07:25 +0000 (08:07 +0900)
committerhayashi <hayashi.yuu@gmail.com>
Sat, 8 Jul 2017 23:07:25 +0000 (08:07 +0900)
importPicture/src/osm/jp/gpx/ElementMapTRKPT.java
importPicture/test/osm/jp/gpx/ElementMapTRKPTTest.java

index c88b168..ab25615 100644 (file)
@@ -56,8 +56,8 @@ public class ElementMapTRKPT extends TreeMap<Date, TagTrkpt> {
                 if (Complementation.param_GpxOutputSpeed) {
                        comp.complementationSpeed();
                 }
-                
-                return (TagTrkpt)(comp.imaTag.trkpt.cloneNode(true));
+                //return (TagTrkpt)(comp.imaTag.trkpt.cloneNode(true));
+                return (TagTrkpt)(comp.imaTag);
             }
             return imaE;
         }
@@ -110,7 +110,7 @@ public class ElementMapTRKPT extends TreeMap<Date, TagTrkpt> {
        Date maeTime = null;
                for (Date key : this.keySet()) {
                        int flag = time.compareTo(key);
-                       if (flag < 0) {
+                       if (flag > 0) {
                                maeTime = new Date(key.getTime());
                        }
                        else if (flag == 0) {
@@ -120,6 +120,7 @@ public class ElementMapTRKPT extends TreeMap<Date, TagTrkpt> {
                                return this.get(maeTime);
                        }
                        else {
+                               // time は key より古い
                                if (maeTime == null) {
                                        return null;
                                }
index 759f4e4..3388844 100644 (file)
@@ -165,7 +165,7 @@ public class ElementMapTRKPTTest {
                        assertThat(sdf.format(tag.time), is("2017-05-29T10:23:18Z"));
                        assertThat(tag.eleStr, is(nullValue()));
                        assertThat(tag.lat, is((new Double(values[0][1])).doubleValue()));
-                       assertThat(tag.magvarStr, is(notNullValue()));
+                       assertThat(tag.magvarStr, is(nullValue()));
                }
 
                @Test
@@ -174,7 +174,7 @@ public class ElementMapTRKPTTest {
                        assertThat(sdf.format(tag.time), is("2017-05-29T10:23:18Z"));
                        assertThat(tag.eleStr, is(nullValue()));
                        assertThat(tag.lat, is((new Double(values[0][1])).doubleValue()));
-                       assertThat(tag.magvarStr, is(notNullValue()));
+                       assertThat(tag.magvarStr, is(nullValue()));
                }
 
                @Test