diff --git a/pom.xml b/pom.xml
index 937799f..629f6d6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,12 +3,6 @@
osm.surveyor
adjustgpx-core
5.3.16-SNAPSHOT
-
- scm:git:http://surveyor.mydns.jp/gitbucket/git/yuu/adjustgpx-core.git
- http://surveyor.mydns.jp/gitbucket/yuu/adjustgpx-core/wiki
- scm:git:http://surveyor.mydns.jp/gitbucket/git/yuu/adjustgpx-core.git
- v5.3.13
-
UTF-8
@@ -17,71 +11,17 @@
${java.version}
true
true
+
+ UTF-8
+ UTF-8
+
+
+ 4.13.1
+ 1.3
-
-
-
- surveyor.haya4
- Internal Release Repository
- http://surveyor.mydns.jp/archiva/repository/haya4/
-
-
- surveyor.snapshots
- http://surveyor.mydns.jp/archiva/repository/snapshots/
-
-
-
-
-
- surveyor.haya4
- Hayashi Repository
- http://surveyor.mydns.jp/archiva/repository/haya4/
-
- true
-
-
- false
-
-
-
- surveyor.snapshots
- Archiva Managed Snapshot Repository
- http://surveyor.mydns.jp/archiva/repository/snapshots/
-
- false
-
-
- true
-
-
-
-
- surveyor.haya4
- haya4
- http://surveyor.mydns.jp/archiva/repository/haya4/
-
- true
-
-
- false
-
-
-
- surveyor.snapshots
- Archiva Managed Snapshot Repository
- http://surveyor.mydns.jp/archiva/repository/snapshots/
-
- false
-
-
- true
-
-
-
-
sonatype-public-repository
https://oss.sonatype.org/content/groups/public
@@ -113,6 +53,13 @@
jar
+
+
+ org.geotools
+ gt-main
+ 25.1
+
+
com.googlecode.maven-download-plugin
diff --git a/src/main/java/osm/jp/gpx/AppParameters.java b/src/main/java/osm/jp/gpx/AppParameters.java
index dba4fb5..383f27f 100644
--- a/src/main/java/osm/jp/gpx/AppParameters.java
+++ b/src/main/java/osm/jp/gpx/AppParameters.java
@@ -58,6 +58,9 @@
public static String GPX_REUSE = "GPX.REUSE";
+ // simplify distance (m)
+ public static String SIMPLIFY_METERS = "0.0";
+
//public boolean param_ImgOutputAll = false;
//public boolean exif = false;
//public boolean param_GpxSplit = false;
@@ -191,6 +194,14 @@
setProperty(AppParameters.GPX_BASETIME, "FILE_UPDATE");
}
+ //------------------------------------------------
+ // simplify distance (m)
+ valueStr = getProperty(AppParameters.SIMPLIFY_METERS);
+ if (valueStr == null) {
+ update = true;
+ setProperty(AppParameters.SIMPLIFY_METERS, String.valueOf("0.0"));
+ }
+
// その他のパラメータを読み取る
valueStr = getProperty(AppParameters.GPX_GPXSPLIT);
if (valueStr == null) {
@@ -254,7 +265,8 @@
System.out.println(" - param: "+ AppParameters.GPX_OUTPUT_SPEED +"="+ getProperty(AppParameters.GPX_OUTPUT_SPEED));
System.out.println(" - param: "+ AppParameters.GPX_GPXSPLIT +"="+ isGpxSplit());
System.out.println(" - param: "+ AppParameters.GPX_NO_FIRST_NODE +"="+ isGpxNoFirstNode());
- System.out.println(" - param: "+ AppParameters.GPX_REUSE +"="+ isGpxReuse());
+ System.out.println(" - param: "+ AppParameters.GPX_REUSE +"="+ isGpxReuse());
+ System.out.println(" - param: "+ AppParameters.SIMPLIFY_METERS +"="+ getSimplifyMeters());
}
/**
@@ -304,6 +316,16 @@
return Paths.get(str);
}
+ //------------------------------------------------
+ // simplify distance (m)
+ public double getSimplifyMeters() {
+ String str = getProperty(AppParameters.SIMPLIFY_METERS);
+ if (str == null) {
+ return 0.0D;
+ }
+ return Double.parseDouble(str);
+ }
+
/**
* AppParameters.GPX_GPXSPLIT
* @return
diff --git a/src/main/java/osm/jp/gpx/ElementMapTRKSEG.java b/src/main/java/osm/jp/gpx/ElementMapTRKSEG.java
index a3bcae0..95f0676 100644
--- a/src/main/java/osm/jp/gpx/ElementMapTRKSEG.java
+++ b/src/main/java/osm/jp/gpx/ElementMapTRKSEG.java
@@ -39,13 +39,13 @@
}
public void printheader() {
- System.out.println("|--------------------------------+--------------------+--------------------|");
- System.out.println("| GPS logging time | First Time | Last Time |");
- System.out.println("|--------------------------------+--------------------+--------------------|");
+ System.out.println("|--------------------------------+------------------------+------------------------|");
+ System.out.println("| GPS logging time | First Time | Last Time |");
+ System.out.println("|--------------------------------+------------------------+------------------------|");
}
public void printfooter() {
- System.out.println("|--------------------------------+--------------------+--------------------|");
+ System.out.println("|--------------------------------+------------------------+------------------------|");
System.out.println();
}
diff --git a/src/main/java/osm/jp/gpx/ImgFile.java b/src/main/java/osm/jp/gpx/ImgFile.java
index bd67b6b..77842cc 100644
--- a/src/main/java/osm/jp/gpx/ImgFile.java
+++ b/src/main/java/osm/jp/gpx/ImgFile.java
@@ -301,13 +301,13 @@
}
public static void printheader() {
- System.out.println("|--------------------------------|--------------------|--------------------|--------------|--------------|--------|------|------|");
- System.out.println("| name | Camera Time | GPStime | Latitude | Longitude | ele |magvar| km/h |");
- System.out.println("|--------------------------------|--------------------|--------------------|--------------|--------------|--------|------|------|");
+ System.out.println("|--------------------------------|------------------------|------------------------|--------------|--------------|--------|------|------|");
+ System.out.println("| name | Camera Time | GPStime | Latitude | Longitude | ele |magvar| km/h |");
+ System.out.println("|--------------------------------|------------------------|------------------------|--------------|--------------|--------|------|------|");
}
public static void printfooter() {
- System.out.println("|--------------------------------|--------------------|--------------------|--------------|--------------|--------|------|------|");
+ System.out.println("|--------------------------------|------------------------|------------------------|--------------|--------------|--------|------|------|");
System.out.println();
}
}
diff --git a/src/main/java/osm/jp/gpx/ImgFolder.java b/src/main/java/osm/jp/gpx/ImgFolder.java
index e94fea3..9785899 100644
--- a/src/main/java/osm/jp/gpx/ImgFolder.java
+++ b/src/main/java/osm/jp/gpx/ImgFolder.java
@@ -55,12 +55,6 @@
* @throws TransformerException
*/
void procGPXfile(GpxFile gpxFile, long delta) throws ParserConfigurationException, SAXException, IOException, ParseException, ImageReadException, ImageWriteException, TransformerException {
- // imgDir内の画像ファイルを処理する
- //System.out.println("|--------------------------------|--------------------|--------------------|--------------|--------------|--------|------|------|");
- //System.out.println("| name | Camera Time | GPStime | Latitude | Longitude | ele |magvar| km/h |");
- //System.out.println("|--------------------------------|--------------------|--------------------|--------------|--------------|--------|------|------|");
-
- //ElementMapTRKSEG seg = gpxFile.parse();
for (ImgFile image : this) {
try {
if (!image.isDone()) {
@@ -74,8 +68,6 @@
continue;
}
}
-
- //System.out.println("|--------------------------------|--------------------|--------------------|--------------|--------------|--------|------|------|");
}
/**
diff --git a/src/main/java/osm/jp/gpx/ImportPicture.java b/src/main/java/osm/jp/gpx/ImportPicture.java
index b72ac53..0985fe6 100644
--- a/src/main/java/osm/jp/gpx/ImportPicture.java
+++ b/src/main/java/osm/jp/gpx/ImportPicture.java
@@ -12,6 +12,7 @@
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
+import java.util.ArrayList;
import java.util.Date;
import java.util.ResourceBundle;
import java.util.TimeZone;
@@ -189,6 +190,8 @@
// imgDir内の画像ファイルを処理する
ImgFile.printheader();
+ ArrayList blacklist = new ArrayList<>();
+
for (ImgFile image : imgFolder) {
image.printinfo();
}
@@ -200,17 +203,20 @@
}
}
-
-
-
-
-
- public static final String TIME_FORMAT_STRING = "yyyy-MM-dd'T'HH:mm:ss'Z'";
+ public static final String TIME_FORMAT_STRING = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";
+ public static final String TIME_FORMAT_STRING2 = "yyyy-MM-dd'T'HH:mm:ss'Z'";
public static Date toUTCDate(String timeStr) throws ParseException {
- DateFormat dfUTC = new SimpleDateFormat(TIME_FORMAT_STRING);
- dfUTC.setTimeZone(TimeZone.getTimeZone("UTC"));
- return dfUTC.parse(timeStr);
+ try {
+ DateFormat dfUTC = new SimpleDateFormat(TIME_FORMAT_STRING);
+ dfUTC.setTimeZone(TimeZone.getTimeZone("UTC"));
+ return dfUTC.parse(timeStr);
+ }
+ catch (ParseException pe) {
+ DateFormat dfUTC = new SimpleDateFormat(TIME_FORMAT_STRING2);
+ dfUTC.setTimeZone(TimeZone.getTimeZone("UTC"));
+ return dfUTC.parse(timeStr);
+ }
}
public static String toUTCString(Date localdate) {
diff --git a/src/test/java/osm/jp/gpx/ElementMapTRKSEGTest.java b/src/test/java/osm/jp/gpx/ElementMapTRKSEGTest.java
index 280bed9..7a892c9 100644
--- a/src/test/java/osm/jp/gpx/ElementMapTRKSEGTest.java
+++ b/src/test/java/osm/jp/gpx/ElementMapTRKSEGTest.java
@@ -47,11 +47,11 @@
new Fixture("target/test-classes/gpx/2019-09-07 16.17.12 Day.gpx", 1),
new Fixture("target/test-classes/gpx/2019-12-29 06.50.19 Day.gpx", 1),
new Fixture("target/test-classes/gpx/2020-02-29 13.35.58 Day.gpx", 1),
- //new Fixture("target/test-classes/gpx/muiltiTRK.GarminColorado.gpx.xml", 3),
- //new Fixture("target/test-classes/gpx/muiltiTRKSEG.GarminColorado.gpx.xml", 3),
- //new Fixture("target/test-classes/gpx/muiltiTRKSEG.noNameSpace.gpx.xml", 3),
- //new Fixture("target/test-classes/gpx/multiTRKSEG.eTrex_20J.gpx.xml", 3),
- //new Fixture("target/test-classes/gpx/multiTRKSEGreverse.eTrex_20J.gpx.xml", 3),
+ new Fixture("target/test-classes/gpx/muiltiTRK.GarminColorado.gpx.xml", 3),
+ new Fixture("target/test-classes/gpx/muiltiTRKSEG.GarminColorado.gpx.xml", 3),
+ new Fixture("target/test-classes/gpx/muiltiTRKSEG.noNameSpace.gpx.xml", 3),
+ new Fixture("target/test-classes/gpx/multiTRKSEG.eTrex_20J.gpx.xml", 3),
+ new Fixture("target/test-classes/gpx/multiTRKSEGreverse.eTrex_20J.gpx.xml", 3),
};
@After