Codebase list gpsprune / 2a955ec
Imported Upstream version 18.3 Bas Couwenberg 8 years ago
16 changed file(s) with 81 addition(s) and 23 deletion(s). Raw diff Collapse all Expand all
00 # Build script using external exif library
11 # Version number
2 PRUNENAME=gpsprune_18.2
2 PRUNENAME=gpsprune_18.3
33 # remove compile directory
44 rm -rf compile
55 # remove dist directory
3535 public class GpsPrune
3636 {
3737 /** Version number of application, used in about screen and for version check */
38 public static final String VERSION_NUMBER = "18.2";
38 public static final String VERSION_NUMBER = "18.3";
3939 /** Build number, just used for about screen */
40 public static final String BUILD_NUMBER = "336a";
40 public static final String BUILD_NUMBER = "336b";
4141 /** Static reference to App object */
4242 private static App APP = null;
4343
232232 try
233233 {
234234 ArrayList<Image> icons = new ArrayList<Image>();
235 String[] resolutions = {"_16", "_20", "_32", "_64", "_128"};
235 String[] resolutions = {"_16", "_20", "_22", "_24", "_32", "_36", "_48", "_64", "_72", "_96", "_128"};
236236 for (String r : resolutions) {
237237 icons.add(IconManager.getImageIcon(IconManager.WINDOW_ICON + r + ".png").getImage());
238238 }
254254
255255 // finish off and display frame
256256 frame.pack();
257 frame.setSize(650, 450);
257 if (!setFrameBoundsFromConfig(frame))
258 {
259 frame.setSize(650, 450);
260 }
258261 frame.setVisible(true);
259262 // Set position of map/profile splitter
260263 midSplit.setDividerLocation(0.75);
269272 APP.loadDataFiles(inDataFiles);
270273 }
271274
275
276 /**
277 * Set the frame bounds using the saved config setting
278 * @param inFrame frame to set the bounds of
279 * @return true on success
280 */
281 private static boolean setFrameBoundsFromConfig(JFrame inFrame)
282 {
283 // Try to get bounds from config
284 String bounds = Config.getConfigString(Config.KEY_WINDOW_BOUNDS);
285 try
286 {
287 String[] boundValues = bounds.split("x");
288 if (boundValues.length == 4)
289 {
290 int[] elems = new int[4];
291 for (int i=0; i<4; i++) {
292 elems[i] = Integer.parseInt(boundValues[i]);
293 }
294 // Make sure width and height aren't stupid
295 elems[2] = Math.max(elems[2], 400);
296 elems[3] = Math.max(elems[3], 300);
297 inFrame.setBounds(elems[0], elems[1], elems[2], elems[3]);
298 return true;
299 }
300 }
301 catch (NullPointerException npe) {} // if no entry found in config
302 catch (NumberFormatException nfe) {} // if string couldn't be parsed
303 return false;
304 }
305
306
272307 /**
273308 * Try to guess whether it's a mistyped parameter or a mistyped filename
274309 * @param inParam command line argument
6262 public static final String KEY_MAPSOURCE_LIST = "prune.mapsourcelist";
6363 /** Key for show map flag */
6464 public static final String KEY_SHOW_MAP = "prune.showmap";
65 /** Key for window position */
66 public static final String KEY_WINDOW_BOUNDS = "prune.windowbounds";
6567 /** Key for path to disk cache */
6668 public static final String KEY_DISK_CACHE = "prune.diskcache";
6769 /** Key for working online flag */
0 The source code of GpsPrune is copyright 2006-2015 activityworkshop.net
0 The source code of GpsPrune is copyright 2006-2016 activityworkshop.net
11 and is distributed under the terms of the Gnu GPL version 2.
22
33 Portions of the package jpeg.drew (if included in this package) were taken
33 import java.awt.Component;
44 import java.awt.FlowLayout;
55 import java.awt.GridLayout;
6 import java.awt.Rectangle;
67 import java.awt.event.ActionEvent;
78 import java.awt.event.ActionListener;
89 import java.io.File;
157158 */
158159 private void saveConfig(File inSaveFile)
159160 {
161 // Set current window position in config
162 Rectangle currBounds = _app.getFrame().getBounds();
163 String windowBounds = "" + currBounds.x + "x" + currBounds.y + "x"
164 + currBounds.width + "x" + currBounds.height;
165 Config.setConfigString(Config.KEY_WINDOW_BOUNDS, windowBounds);
166
160167 // TODO: Check for null inSaveFile, then just call finish() ?
161168 FileOutputStream outStream = null;
162169 try
367367 dialog.gpsies.activity.snowshoe=Raquette
368368 dialog.gpsies.activity.sailing=Volle
369369 dialog.gpsies.activity.skating=Skating
370 dialog.mapillary.nonefound=Aucun foto trouv\u00e9
370371 dialog.wikipedia.column.name=Nom de l'article
371372 dialog.wikipedia.column.distance=Distance
372373 dialog.wikipedia.nonefound=Aucune points trouv\u00e9e
374 dialog.wikipedia.gallery=Galerie
375 dialog.geocaching.nonefound=Aucun g\u00e9ocaches trouv\u00e9e
373376 dialog.correlate.notimestamps=Les points n'ont pas d'indication de temps, il n'est pas possible de les corr\u00e9ler.
374377 dialog.correlate.nouncorrelatedphotos=Il n'y a pas de photos non-corr\u00e9l\u00e9es.\nVoulez-vous continuer ?
375378 dialog.correlate.nouncorrelatedaudios=Il n'y a pas d'audios non-corr\u00e9l\u00e9s.\nVoulez-vous continuer ?
519522 dialog.colourer.type.bygradient=Selon la pente
520523 dialog.colourer.type.bydate=Selon la date
521524 dialog.colourer.maxcolours=Nombre de couleurs maximum
525 dialog.colourer.start=Couleur au d\u00e9but
526 dialog.colourer.end=Couleur \u00e0 la fin
522527 dialog.setlanguage.firstintro=Vous pouvez s\u00e9lectionner l'une des langues disponibles,<p> ou bien un fichier de langue \u00e0 utiliser.
523528 dialog.setlanguage.secondintro=Vous devez sauvegarder vos param\u00e8tres puis<p>red\u00e9marrer GpsPrune pour changer de langue.
524529 dialog.setlanguage.language=Langue
571576 dialog.deletebydate.nodate=Sans horodatage
572577 dialog.deletebydate.column.keep=Garder
573578 dialog.deletebydate.column.delete=Supprimer
579 dialog.setaltitudetolerance.text.metres=Limite (m\u00e8tres) pour les petites diff\u00e9rences d'altitude
580 dialog.setaltitudetolerance.text.feet=Limite (pieds) pour les petites diff\u00e9rences d'altitude
574581 dialog.autoplay.duration=Dur\u00e9e (sec)
582 dialog.autoplay.usetimestamps=Utiliser information de temps
583 dialog.autoplay.rewind=Retour au d\u00e9but
575584 dialog.autoplay.pause=Pause
576585 dialog.autoplay.play=Jouer
577586
621630 # Tips
622631 tip.title=Astuce
623632 tip.useamapcache=By setting up a disk cache (Pr\u00e9f\u00e9rences -> Enregistrer les cartes sur le disque)\nyou can speed up the display and reduce network traffic.
624 tip.learntimeparams=The results will be more accurate if you use\nTrace -> Learn time estimation parameters\non your recorded tracks.
633 tip.learntimeparams=The results will be more accurate if you use\nTrace -> Apprentissage de l'estimation\non your recorded tracks.
625634 tip.downloadsrtm=You can speed this up by calling\nEn ligne -> T\u00e9l\u00e9charger les donn\u00e9es SRTM\nto save the data in your map cache.
626 tip.usesrtmfor3d=This track doesn't have altitudes.\nYou can use the SRTM functions to get approximate\naltitudes for the 3d view.
627635 tip.manuallycorrelateone=En corr\u00e9lant manuellement au moins une photo, le d\u00e9calage de temps peut \u00eatre calcul\u00e9 pour vous.
628636
629637 # Buttons
0 GpsPrune version 18.2
0 GpsPrune version 18.3
11 =====================
22
33 GpsPrune is an application for viewing, editing and managing coordinate data from GPS systems,
44 including format conversion, charting, 3d visualisation, audio and photo correlation, and online resource lookup.
55 Full details can be found at http://gpsprune.activityworkshop.net/
66
7 GpsPrune is copyright 2006-2015 activityworkshop.net and distributed under the terms of the Gnu GPL version 2.
7 GpsPrune is copyright 2006-2016 activityworkshop.net and distributed under the terms of the Gnu GPL version 2.
88 You may freely use the software, and may help others to freely use it too. For further information
99 on your rights and how they are protected, see the included license.txt file.
1010
1616 =======
1717
1818 To run GpsPrune from the jar file, simply call it from a command prompt or shell:
19 java -jar gpsprune_18.2.jar
19 java -jar gpsprune_18.3.jar
2020
2121 If the jar file is saved in a different directory, you will need to include the path.
2222 Depending on your system settings, you may be able to click or double-click on the jar file
2424 or other link can of course be made should you wish.
2525
2626 To specify a language other than the default, use an additional parameter, eg:
27 java -jar gpsprune_18.2.jar --lang=DE
28
27 java -jar gpsprune_18.3.jar --lang=DE
28
29
30 New with version 18.3
31 =====================
32 The following fixes and additions were made since version 18.2:
33 - Fix for saving track names and descriptions containing ampersands in xml formats (thanks, Joe!)
34 - Additional window icon sizes (thanks, Sebastic!)
35 - Remember window size
2936
3037 New with version 18.2
3138 =====================
346346 final String gpxHeader = getGpxHeaderString(inGpxCachers);
347347 final boolean isVersion1_1 = (gpxHeader.toUpperCase().indexOf("GPX/1/1") > 0);
348348 inWriter.write(gpxHeader);
349 // Name field
350 String trackName = (inName != null && !inName.equals("")) ? inName : "GpsPruneTrack";
351 writeNameAndDescription(inWriter, inName, inDesc, isVersion1_1);
352
353 int i = 0;
349 // name and description
350 String trackName = (inName != null && !inName.equals("")) ? XmlUtils.fixCdata(inName) : "GpsPruneTrack";
351 String desc = (inDesc != null && !inDesc.equals("")) ? XmlUtils.fixCdata(inDesc) : "Export from GpsPrune";
352 writeNameAndDescription(inWriter, trackName, desc, isVersion1_1);
353
354354 DataPoint point = null;
355355 final boolean exportTrackpoints = inSaveFlags[0];
356356 final boolean exportWaypoints = inSaveFlags[1];
367367 // Loop over waypoints
368368 final int numPoints = inInfo.getTrack().getNumPoints();
369369 int numSaved = 0;
370 for (i=0; i<numPoints; i++)
370 for (int i=0; i<numPoints; i++)
371371 {
372372 point = inInfo.getTrack().getPoint(i);
373373 if (!exportSelection || (i>=selStart && i<=selEnd))
422422 private static void writeNameAndDescription(OutputStreamWriter inWriter,
423423 String inName, String inDesc, boolean inIsVersion1_1) throws IOException
424424 {
425 String desc = (inDesc != null && !inDesc.equals("")) ? inDesc : "Export from GpsPrune";
426425 // Position of name and description fields needs to be different for GPX1.0 and GPX1.1
427426 if (inIsVersion1_1)
428427 {
438437 }
439438 if (inIsVersion1_1) {inWriter.write('\t');}
440439 inWriter.write("\t<desc>");
441 inWriter.write(desc);
440 inWriter.write(inDesc);
442441 inWriter.write("</desc>\n");
443442 if (inIsVersion1_1)
444443 {
482482 inWriter.write("<Folder>\n\t<name>");
483483 if (_descriptionField != null && _descriptionField.getText() != null && !_descriptionField.getText().equals(""))
484484 {
485 inWriter.write(_descriptionField.getText());
485 inWriter.write(XmlUtils.fixCdata(_descriptionField.getText()));
486486 }
487487 else {
488488 inWriter.write("Export from GpsPrune");
3636 // Remove all instances of end block
3737 result = result.replaceAll(CDATA_END, "");
3838 // Now check whether cdata block is required
39 if (!XmlUtils.hasIllegalCharacter(result)) {
39 if (!hasIllegalCharacter(result)) {
4040 return result;
4141 }
4242 return CDATA_START + result + CDATA_END;