diff --git a/pom.xml b/pom.xml
index 2197ce0..4a20e03 100644
--- a/pom.xml
+++ b/pom.xml
@@ -70,7 +70,7 @@
osm.surveyor
adjustgpx-core
- 5.3.15
+ 5.3.20
diff --git a/src/main/java/osm/jp/gpx/matchtime/gui/CardExifPerform.java b/src/main/java/osm/jp/gpx/matchtime/gui/CardExifPerform.java
index a094c77..6c39e7a 100644
--- a/src/main/java/osm/jp/gpx/matchtime/gui/CardExifPerform.java
+++ b/src/main/java/osm/jp/gpx/matchtime/gui/CardExifPerform.java
@@ -72,11 +72,9 @@
// 出力フォルダ
argsPanel.add(arg_output);
- argsPanel.add(arg_output.outputIMG);
- argsPanel.add(arg_output.outputIMG_all);
- argsPanel.add(arg_output.exifON);
argsPanel.add(arg_output.gpxOverwriteMagvar);
argsPanel.add(arg_output.gpxOutputSpeed);
+ argsPanel.add(arg_output.simplifyMeters);
// [処理実行]ボタン
doButton = new JButton(
@@ -127,13 +125,11 @@
params.setProperty(AppParameters.IMG_BASE_FILE, arg_baseTimeImg.getText());
params.setProperty(AppParameters.IMG_TIME, ImportPicture.toUTCString(dfjp.parse(arg_basetime.getText())));
- params.setProperty(AppParameters.IMG_OUTPUT, String.valueOf(arg_output.isUpdateImages()));
- params.setProperty(AppParameters.IMG_OUTPUT_ALL, String.valueOf(arg_output.isUpdateImagesAtAll()));
params.setProperty(AppParameters.IMG_OUTPUT_FOLDER, arg_output.getText());
- params.setProperty(AppParameters.IMG_OUTPUT_EXIF, String.valueOf(arg_output.isUpdateExif()));
params.setProperty(AppParameters.GPX_OVERWRITE_MAGVAR, String.valueOf(arg_output.isUpdateMagvar()));
params.setProperty(AppParameters.GPX_OUTPUT_SPEED, String.valueOf(arg_output.isUpdateSpeed()));
+ params.setProperty(AppParameters.SIMPLIFY_METERS, String.valueOf(arg_output.getSimplify()));
params.store();
}
catch(Exception e) {
diff --git a/src/main/java/osm/jp/gpx/matchtime/gui/parameters/ParameterPanelOutput.java b/src/main/java/osm/jp/gpx/matchtime/gui/parameters/ParameterPanelOutput.java
index b96dd7d..875059a 100644
--- a/src/main/java/osm/jp/gpx/matchtime/gui/parameters/ParameterPanelOutput.java
+++ b/src/main/java/osm/jp/gpx/matchtime/gui/parameters/ParameterPanelOutput.java
@@ -9,11 +9,12 @@
@SuppressWarnings("serial")
public class ParameterPanelOutput extends ParameterPanelFolder
{
- public JCheckBox outputIMG; // IMGの変換 する/しない
- public JCheckBox outputIMG_all; // 'out of GPX time'でもIMGの変換をする {ON | OFF}
- public JCheckBox exifON; // EXIF 書き出しモード / !(EXIFの書き換えはしない)
+ //public JCheckBox outputIMG; // IMGの変換 する/しない
+ //public JCheckBox outputIMG_all; // 'out of GPX time'でもIMGの変換をする {ON | OFF}
+ //public JCheckBox exifON; // EXIF 書き出しモード / !(EXIFの書き換えはしない)
public JCheckBox gpxOverwriteMagvar; // ソースGPXのを無視する
public JCheckBox gpxOutputSpeed; // GPXにを書き出す
+ public ParameterPanelSimplify simplifyMeters; // 「単純化(m)」正の整数 TEXT
/**
* コンストラクタ
@@ -27,30 +28,13 @@
super(name, label, text, JFileChooser.DIRECTORIES_ONLY);
//---- CENTER -----
- this.outputIMG = new JCheckBox(i18n.getString("label.510"), false);
- this.outputIMG_all = new JCheckBox(i18n.getString("label.520"), false);
- this.exifON = new JCheckBox(i18n.getString("label.540"), false);
this.gpxOverwriteMagvar = new JCheckBox(i18n.getString("label.560"), false);
this.gpxOutputSpeed = new JCheckBox(i18n.getString("label.570"), false);
+ this.simplifyMeters = new ParameterPanelSimplify("simplify", i18n.getString("label.580"), "3");
try {
AppParameters params = new AppParameters();
- // チェックボックス "IMGの変換をする"
- if (params.getProperty(AppParameters.IMG_OUTPUT).equals("true")) {
- this.outputIMG.setEnabled(true);
- }
-
- // チェックボックス "IMGの変換をする"
- if (params.getProperty(AppParameters.IMG_OUTPUT_ALL).equals("true")) {
- this.outputIMG_all.setEnabled(true);
- }
-
- // チェックボックス "EXIFの変換をする"
- if (params.getProperty(AppParameters.IMG_OUTPUT_EXIF).equals("true")) {
- this.exifON.setEnabled(true);
- }
-
// チェックボックス "ソースGPXのを無視する"
if (params.getProperty(AppParameters.GPX_OVERWRITE_MAGVAR).equals("true")) {
this.gpxOverwriteMagvar.setEnabled(true);
@@ -60,22 +44,23 @@
if (params.getProperty(AppParameters.GPX_OUTPUT_SPEED).equals("true")) {
this.gpxOutputSpeed.setEnabled(true);
}
+
+ // TEXTボックス "単純化(m)"
+ if (params.getProperty(AppParameters.SIMPLIFY_METERS) != null) {
+ String str = params.getProperty(AppParameters.SIMPLIFY_METERS);
+ if (str.isEmpty()) {
+ this.simplifyMeters.setText("3");
+ this.simplifyMeters.setEnabled(true);
+ }
+ else {
+ this.simplifyMeters.setText(str);
+ this.simplifyMeters.setEnabled(true);
+ }
+ }
}
catch (Exception e) {}
}
- public boolean isUpdateImages() {
- return outputIMG.isSelected();
- }
-
- public boolean isUpdateImagesAtAll() {
- return outputIMG_all.isSelected();
- }
-
- public boolean isUpdateExif() {
- return exifON.isSelected();
- }
-
public boolean isUpdateMagvar() {
return gpxOverwriteMagvar.isSelected();
}
@@ -83,4 +68,13 @@
public boolean isUpdateSpeed() {
return gpxOutputSpeed.isSelected();
}
+
+ public int getSimplify() {
+ try {
+ return this.simplifyMeters.getSimplify();
+ }
+ catch (NumberFormatException e) {
+ return 0;
+ }
+ }
}
\ No newline at end of file
diff --git a/src/main/java/osm/jp/gpx/matchtime/gui/parameters/ParameterPanelSimplify.java b/src/main/java/osm/jp/gpx/matchtime/gui/parameters/ParameterPanelSimplify.java
new file mode 100644
index 0000000..7cdf04b
--- /dev/null
+++ b/src/main/java/osm/jp/gpx/matchtime/gui/parameters/ParameterPanelSimplify.java
@@ -0,0 +1,49 @@
+package osm.jp.gpx.matchtime.gui.parameters;
+
+/**
+ * 『単純化(m)」パラメータを設定する為のパネル。正の整数
+ * simplify distance (m)
+ */
+@SuppressWarnings("serial")
+public class ParameterPanelSimplify extends ParameterPanel
+{
+ public ParameterPanelSimplify(
+ String name,
+ String label,
+ String text
+ ) {
+ super(name, label, text);
+ }
+
+ public int getSimplify() throws NumberFormatException {
+ int simplify = 0;
+ String text = this.argField.getText();
+ if (text == null) {
+ simplify = 0;
+ }
+ else {
+ if (text.isEmpty()) {
+ simplify = 0;
+ }
+ else {
+ simplify = Integer.parseInt(text);
+ }
+ }
+ return simplify;
+ }
+
+ @Override
+ public boolean isEnable() {
+ String text = this.argField.getText();
+ if (text == null) {
+ return false;
+ }
+ try {
+ getSimplify();
+ return true;
+ }
+ catch (Exception e) {
+ return false;
+ }
+ }
+}
diff --git a/src/main/java/osm/jp/gpx/matchtime/gui/parameters/ParameterPanelTime.java b/src/main/java/osm/jp/gpx/matchtime/gui/parameters/ParameterPanelTime.java
index ae332a0..ed94ec6 100644
--- a/src/main/java/osm/jp/gpx/matchtime/gui/parameters/ParameterPanelTime.java
+++ b/src/main/java/osm/jp/gpx/matchtime/gui/parameters/ParameterPanelTime.java
@@ -21,7 +21,6 @@
import org.apache.commons.imaging.formats.tiff.TiffImageMetadata;
import org.apache.commons.imaging.formats.tiff.constants.ExifTagConstants;
import osm.jp.gpx.AppParameters;
-import osm.jp.gpx.Restamp;
import static osm.jp.gpx.matchtime.gui.AdjustTerra.dfjp;
@@ -33,8 +32,7 @@
private static final long serialVersionUID = 1683226418990348336L;
static SimpleDateFormat sdf = (SimpleDateFormat)DateFormat.getDateTimeInstance();
public static SimpleDateFormat exifDateTime = new SimpleDateFormat("yyyy:MM:dd HH:mm:ss");
- ParameterPanelImageFile imageFile; // 基準時刻画像
-
+ ParameterPanelImageFile imageFile; // 基準時刻画像
// 基準時刻の指定グループ (排他選択)
public ButtonGroup baseTimeGroup = new ButtonGroup();
@@ -172,7 +170,7 @@
File timeFile = imageFile.getImageFile();
// Radio Selector
- sdf.applyPattern(Restamp.TIME_PATTERN);
+ sdf.applyPattern("yyyy-MM-dd HH:mm:ss z");
if ((exifBase != null) && exifBase.isSelected()) {
try {
ImageMetadata meta = Imaging.getMetadata(timeFile);
@@ -223,7 +221,7 @@
public static boolean isValid(String str) {
if (str != null) {
try {
- sdf.applyPattern(Restamp.TIME_PATTERN);
+ sdf.applyPattern("yyyy-MM-dd HH:mm:ss z");
sdf.parse(str);
return true;
}
diff --git a/src/main/resources/i18n.properties b/src/main/resources/i18n.properties
index 80057e2..cf62f0d 100644
--- a/src/main/resources/i18n.properties
+++ b/src/main/resources/i18n.properties
@@ -51,6 +51,7 @@
label.550=Output point marker to GPX file
label.560=Ignoring of source GPX
label.570=Overwrite in output GPX
+label.580=Simplify (m)
msg.100=GPX file or directory does not exist.('%s')
msg.110=The target GPX file can not be found.('%s')
diff --git a/src/main/resources/i18n_ja_JP.properties b/src/main/resources/i18n_ja_JP.properties
index 920d0f3..1ad69ed 100644
--- a/src/main/resources/i18n_ja_JP.properties
+++ b/src/main/resources/i18n_ja_JP.properties
@@ -51,6 +51,7 @@
label.550=\u30DD\u30A4\u30F3\u30C8\u30DE\u30FC\u30AB\u30FC\u3092GPX\u30D5\u30A1\u30A4\u30EB\u306B\u51FA\u529B\u3059\u308B
label.560=\u30BD\u30FC\u30B9GPX\u306E\u3092\u7121\u8996\u3059\u308B
label.570=\u51FA\u529BGPX\u306B\u3092\u4E0A\u66F8\u304D\u3059\u308B
+label.580=Simplify (m)
tab.restamp.400=4. \u5909\u63DB\u306E\u5B9F\u884C