diff --git a/importPicture/src/osm/jp/gpx/ElementMapTRKPT.java b/importPicture/src/osm/jp/gpx/ElementMapTRKPT.java index c88b168..ab25615 100644 --- a/importPicture/src/osm/jp/gpx/ElementMapTRKPT.java +++ b/importPicture/src/osm/jp/gpx/ElementMapTRKPT.java @@ -56,8 +56,8 @@ 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 @@ 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 @@ return this.get(maeTime); } else { + // time は key より古い if (maeTime == null) { return null; } diff --git a/importPicture/test/osm/jp/gpx/ElementMapTRKPTTest.java b/importPicture/test/osm/jp/gpx/ElementMapTRKPTTest.java index 759f4e4..3388844 100644 --- a/importPicture/test/osm/jp/gpx/ElementMapTRKPTTest.java +++ b/importPicture/test/osm/jp/gpx/ElementMapTRKPTTest.java @@ -165,7 +165,7 @@ 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 @@ 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