public class GpsPrune
{
/** Version number of application, used in about screen and for version check */
- public static final String VERSION_NUMBER = "19";
+ public static final String VERSION_NUMBER = "19.1";
/** Build number, just used for about screen */
- public static final String BUILD_NUMBER = "362";
+ public static final String BUILD_NUMBER = "363c";
/** Static reference to App object */
private static App APP = null;
*/
public static void calculateGradient(Track inTrack, int inIndex, SpeedValue inValue)
{
- inValue.setInvalid();
+ if (inValue != null)
+ {
+ inValue.setInvalid();
+ }
if (inTrack == null || inIndex < 0 || inValue == null)
{
System.err.println("Cannot calculate gradient for index " + inIndex);
*/
public static void calculateSpeed(Track inTrack, int inIndex, SpeedValue inValue)
{
- inValue.setInvalid();
+ if (inValue != null)
+ {
+ inValue.setInvalid();
+ }
if (inTrack == null || inIndex < 0 || inValue == null)
{
System.err.println("Cannot calculate speed for index " + inIndex);
{
return _text;
}
-
+
// Nothing cached, so use the regular one
return super.getText(inFormat, inTimezone);
}
/** Key typed */
public void keyTyped(KeyEvent event) {
final boolean isNumber = "1234567890".indexOf(event.getKeyChar()) >= 0;
- _okButton.setEnabled(isNumber || getOffsetSecs() != 0L);
+ _okButton.setEnabled(isNumber || getOffsetSecs() != 0L);
}
};
MouseAdapter mouseListener = new MouseAdapter() {
{
InputStream in = GetWikipediaFunction.class.getResourceAsStream("/tim/prune/function/search/wikimedia_galleries.txt");
reader = new BufferedReader(new InputStreamReader(in));
- if (reader != null)
+
+ ArrayList<SearchResult> trackList = new ArrayList<SearchResult>();
+ DataPoint herePoint = new DataPoint(new Latitude(inLat, Latitude.FORMAT_DEG), new Longitude(inLon, Longitude.FORMAT_DEG), null);
+ // Loop through the file line by line, looking for nearby points
+ String line = null;
+ while ((line = reader.readLine()) != null)
{
- ArrayList<SearchResult> trackList = new ArrayList<SearchResult>();
- DataPoint herePoint = new DataPoint(new Latitude(inLat, Latitude.FORMAT_DEG), new Longitude(inLon, Longitude.FORMAT_DEG), null);
- // Loop through the file line by line, looking for nearby points
- String line = null;
- while ((line = reader.readLine()) != null)
+ String[] lineComps = line.split("\t");
+ if (lineComps.length == 4)
{
- String[] lineComps = line.split("\t");
- if (lineComps.length == 4)
+ DataPoint p = new DataPoint(new Latitude(lineComps[2]), new Longitude(lineComps[3]), null);
+ double distFromHere = Distance.convertRadiansToDistance(
+ DataPoint.calculateRadiansBetween(p, herePoint), UnitSetLibrary.UNITS_KILOMETRES);
+ if (distFromHere < MAX_DISTANCE)
{
- DataPoint p = new DataPoint(new Latitude(lineComps[2]), new Longitude(lineComps[3]), null);
- double distFromHere = Distance.convertRadiansToDistance(
- DataPoint.calculateRadiansBetween(p, herePoint), UnitSetLibrary.UNITS_KILOMETRES);
- if (distFromHere < MAX_DISTANCE)
- {
- SearchResult gallery = new SearchResult();
- gallery.setTrackName(I18nManager.getText("dialog.wikipedia.gallery") + ": " + lineComps[0]);
- gallery.setDescription(lineComps[1]);
- gallery.setLatitude(lineComps[2]);
- gallery.setLongitude(lineComps[3]);
- gallery.setWebUrl("https://commons.wikimedia.org/wiki/" + lineComps[0]);
- gallery.setLength(distFromHere * 1000.0); // convert from km to m
- trackList.add(gallery);
- }
+ SearchResult gallery = new SearchResult();
+ gallery.setTrackName(I18nManager.getText("dialog.wikipedia.gallery") + ": " + lineComps[0]);
+ gallery.setDescription(lineComps[1]);
+ gallery.setLatitude(lineComps[2]);
+ gallery.setLongitude(lineComps[3]);
+ gallery.setWebUrl("https://commons.wikimedia.org/wiki/" + lineComps[0]);
+ gallery.setLength(distFromHere * 1000.0); // convert from km to m
+ trackList.add(gallery);
}
}
- _trackListModel.addTracks(trackList, true);
}
+ _trackListModel.addTracks(trackList, true);
}
catch (java.io.IOException e) {
System.err.println("Exception trying to read wikimedia file : " + e.getMessage());
}
}
// If the region and offset were given, then list is unlimited
- nameList.setUnlimited(inRegion != null && inOffset != null && inRegion != null);
+ nameList.setUnlimited(inRegion != null && inOffset != null);
// Add all the found names to the listbox
for (String name : zoneNames)
{
public enum WebService
{
- MAP_SOURCE_GOOGLE, /* Google maps */
- MAP_SOURCE_OSM, /* OpenStreetMap */
- MAP_SOURCE_MAPQUEST, /* Mapquest */
- MAP_SOURCE_YAHOO, /* Yahoo */
- MAP_SOURCE_BING, /* Bing */
- MAP_SOURCE_PEAKFINDER, /* PeakFinder */
- MAP_SOURCE_GEOHACK, /* Geohack */
+ MAP_SOURCE_GOOGLE, /* Google maps */
+ MAP_SOURCE_OSM, /* OpenStreetMap */
+ MAP_SOURCE_MAPQUEST, /* Mapquest */
+ MAP_SOURCE_YAHOO, /* Yahoo */
+ MAP_SOURCE_BING, /* Bing */
+ MAP_SOURCE_PEAKFINDER, /* PeakFinder */
+ MAP_SOURCE_GEOHACK, /* Geohack */
+ MAP_SOURCE_INLINESKATE, /* Inlinemap.net */
+ MAP_SOURCE_GRAPHHOPPER /* Routing with GraphHopper */
}
/**
return generateBingUrl(inTrackInfo);
case MAP_SOURCE_PEAKFINDER:
case MAP_SOURCE_GEOHACK:
+ case MAP_SOURCE_INLINESKATE:
return generateUrlForPoint(inSource, inTrackInfo);
+ case MAP_SOURCE_GRAPHHOPPER:
+ return generateGraphHopperUrl(inTrackInfo);
case MAP_SOURCE_OSM:
default:
return generateOpenStreetMapUrl(inTrackInfo);
return url;
}
+ /**
+ * Generate a url for routing with GraphHopper
+ * @param inTrackInfo track information
+ * @return URL
+ */
+ private static String generateGraphHopperUrl(TrackInfo inTrackInfo)
+ {
+ // Check if any data to display
+ if (inTrackInfo != null && inTrackInfo.getTrack() != null && inTrackInfo.getTrack().getNumPoints() >= 2)
+ {
+ if (inTrackInfo.getTrack().getNumPoints() == 2)
+ {
+ // Use first and last point of track
+ return generateGraphHopperUrl(inTrackInfo.getTrack().getPoint(0),
+ inTrackInfo.getTrack().getPoint(1));
+ }
+ else if (inTrackInfo.getSelection().hasRangeSelected())
+ {
+ // Use first and last point of selection
+ final int startIndex = inTrackInfo.getSelection().getStart();
+ final int endIndex = inTrackInfo.getSelection().getEnd();
+ return generateGraphHopperUrl(inTrackInfo.getTrack().getPoint(startIndex),
+ inTrackInfo.getTrack().getPoint(endIndex));
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Generate a url for routing with GraphHopper
+ * @param inStartPoint start point of routing
+ * @param inEndPoint end point of routing
+ * @return URL
+ */
+ private static String generateGraphHopperUrl(DataPoint inStartPoint, DataPoint inEndPoint)
+ {
+ final String url = "https://graphhopper.com/maps/"
+ + "?point=" + FIVE_DP.format(inStartPoint.getLatitude().getDouble())
+ + "%2C" + FIVE_DP.format(inStartPoint.getLongitude().getDouble())
+ + "&point=" + FIVE_DP.format(inEndPoint.getLatitude().getDouble())
+ + "%2C" + FIVE_DP.format(inEndPoint.getLongitude().getDouble())
+ + "&locale=" + I18nManager.getText("wikipedia.lang")
+ + "&elevation=true&weighting=fastest";
+ return url;
+ }
+
/**
* Generate a url for Open Street Map
* @param inTrackInfo track information
return generatePeakfinderUrl(currPoint);
case MAP_SOURCE_GEOHACK:
return generateGeohackUrl(currPoint);
+ case MAP_SOURCE_INLINESKATE:
+ return generateInlinemapUrl(currPoint);
default:
return null;
}
*/
private static String generatePeakfinderUrl(DataPoint inPoint)
{
- return "http://peakfinder.org/?lat=" + FIVE_DP.format(inPoint.getLatitude().getDouble())
+ return "https://www.peakfinder.org/?lat=" + FIVE_DP.format(inPoint.getLatitude().getDouble())
+ "&lng=" + FIVE_DP.format(inPoint.getLongitude().getDouble());
}
{
return "https://tools.wmflabs.org/geohack/geohack.php?params=" + FIVE_DP.format(inPoint.getLatitude().getDouble())
+ "_N_" + FIVE_DP.format(inPoint.getLongitude().getDouble()) + "_E";
- // TODO: Could use absolute values and S, W but this seems to work
+ // Note: Could use absolute values and S, W but this seems to work
}
+ /**
+ * Generate a url for Inlinemap.net
+ * @param inPoint current point, not null
+ * @return URL
+ */
+ private static String generateInlinemapUrl(DataPoint inPoint)
+ {
+ return "http://www.inlinemap.net/en/?tab=new#/z14/" + FIVE_DP.format(inPoint.getLatitude().getDouble())
+ + "," + FIVE_DP.format(inPoint.getLongitude().getDouble()) + "/terrain";
+ }
/**
* Get the median value from the given lat/long range
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
private Track _track = null;
private DataPoint _point = null;
private EditFieldsTableModel _model = null;
+ private JButton _cancelButton = null;
private int _prevRowIndex = -1;
public void run() {
_valueField.setVisible(false);
_valueAreaPane.setVisible(false);
+ _cancelButton.requestFocus();
}
});
_dialog.setVisible(true);
// Bottom panel for OK, cancel buttons
JPanel lowerPanel = new JPanel();
lowerPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));
- JButton cancelButton = new JButton(I18nManager.getText("button.cancel"));
- cancelButton.addActionListener(new ActionListener() {
+ _cancelButton = new JButton(I18nManager.getText("button.cancel"));
+ _cancelButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
_dialog.dispose();
}
});
- lowerPanel.add(cancelButton);
+ _cancelButton.addKeyListener(new KeyAdapter() {
+ public void keyPressed(KeyEvent inE) {
+ if (inE.getKeyCode() == KeyEvent.VK_ESCAPE) {_dialog.dispose();}
+ }
+ });
+ lowerPanel.add(_cancelButton);
JButton okButton = new JButton(I18nManager.getText("button.ok"));
okButton.addActionListener(okListener);
lowerPanel.add(okButton);
private JCheckBoxMenuItem _mapCheckbox = null;
private JMenuItem _show3dItem = null;
private JMenu _browserMapMenu = null;
+ private JMenuItem _routingGraphHopperItem = null;
private JMenuItem _chartItem = null;
private JMenuItem _getGpsiesItem = null;
private JMenuItem _uploadGpsiesItem = null;
_browserMapMenu.add(yahooMapsItem);
JMenuItem bingMapsItem = makeMenuItem(new WebMapFunction(_app, UrlGenerator.WebService.MAP_SOURCE_BING, "menu.view.browser.bing"));
_browserMapMenu.add(bingMapsItem);
+ JMenuItem inlineMapItem = makeMenuItem(new WebMapFunction(_app, UrlGenerator.WebService.MAP_SOURCE_INLINESKATE, "menu.view.browser.inlinemap"));
+ _browserMapMenu.add(inlineMapItem);
+ _routingGraphHopperItem = makeMenuItem(new WebMapFunction(_app, UrlGenerator.WebService.MAP_SOURCE_GRAPHHOPPER, "menu.view.browser.graphhopper"));
+ _browserMapMenu.add(_routingGraphHopperItem);
onlineMenu.add(_browserMapMenu);
// wikipedia
_nearbyWikipediaItem = makeMenuItem(FunctionLibrary.FUNCTION_NEARBY_WIKIPEDIA, false);
trackMenu.add(_clearUndoItem);
trackMenu.addSeparator();
_compressItem = makeMenuItem(FunctionLibrary.FUNCTION_COMPRESS, false);
- setShortcut(_compressItem, "shortcut.menu.edit.compress");
+ setShortcut(_compressItem, "shortcut.menu.track.compress");
trackMenu.add(_compressItem);
_markRectangleItem = new JMenuItem(I18nManager.getText("menu.track.markrectangle"));
_markRectangleItem.addActionListener(new ActionListener() {
};
_editPointItem.addActionListener(_editPointAction);
_editPointItem.setEnabled(false);
+ setShortcut(_editPointItem, "shortcut.menu.point.edit");
pointMenu.add(_editPointItem);
_editWaypointNameItem = makeMenuItem(FunctionLibrary.FUNCTION_EDIT_WAYPOINT_NAME, false);
pointMenu.add(_editWaypointNameItem);
|| _selection.getCurrentPointIndex() > (_selection.getEnd()+1));
_cutAndMoveItem.setEnabled(canCutAndMove);
_cutAndMoveButton.setEnabled(canCutAndMove);
+ final boolean isTrackLengthTwo = hasData && _track.getNumPoints() == 2;
+ _routingGraphHopperItem.setEnabled(isTrackLengthTwo || (hasData && hasRange));
// Has the map been switched on/off?
boolean mapsOn = Config.getConfigBoolean(Config.KEY_SHOW_MAP);
if (_mapCheckbox.isSelected() != mapsOn) {
{
_trackpointsLabel.setText(I18nManager.getText("details.notrack"));
_filenameLabel.setText("");
+ _filenameLabel.setToolTipText("");
}
else
{
int numFiles = _trackInfo.getFileInfo().getNumFiles();
if (numFiles == 1)
{
+ final String filenameString = _trackInfo.getFileInfo().getFilename();
_filenameLabel.setText(I18nManager.getText("details.track.file") + ": "
- + _trackInfo.getFileInfo().getFilename());
+ + filenameString);
+ _filenameLabel.setToolTipText(filenameString);
}
else if (numFiles > 1)
{
- _filenameLabel.setText(I18nManager.getText("details.track.numfiles") + ": " + numFiles);
+ final String labelText = I18nManager.getText("details.track.numfiles") + ": " + numFiles;
+ _filenameLabel.setText(labelText);
+ _filenameLabel.setToolTipText(labelText);
+ }
+ else
+ {
+ _filenameLabel.setText("");
+ _filenameLabel.setToolTipText("");
}
- else _filenameLabel.setText("");
}
// Update scroller settings
}
}
+ /** Inner class to remember a single index */
+ class PointIndex
+ {
+ public int index = -1;
+ public boolean hasValue = false;
+ public PointIndex()
+ {
+ index = -1;
+ hasValue = false;
+ }
+ /** Set a single value */
+ public void set(int inValue)
+ {
+ index = inValue;
+ hasValue = (inValue != -1);
+ }
+ /** Add an index to the minimum calculation */
+ public void setMin(PointIndex other)
+ {
+ if (!other.hasValue) {return;}
+ if (!hasValue) {
+ index = other.index;
+ hasValue = other.hasValue;
+ }
+ else {
+ index = Math.min(index, other.index);
+ }
+ }
+ /** Add an index to the maximum calculation */
+ public void setMax(PointIndex other)
+ {
+ if (!other.hasValue) {return;}
+ if (!hasValue) {
+ index = other.index;
+ hasValue = other.hasValue;
+ }
+ else {
+ index = Math.max(index, other.index);
+ }
+ }
+ /** @return true if two Indexes are equal */
+ public boolean equals(PointIndex other)
+ {
+ if (!hasValue || !other.hasValue) {
+ return hasValue == other.hasValue;
+ }
+ return index == other.index;
+ }
+ }
+
+ /** Inner class to remember previous chart parameters */
+ class ChartParameters
+ {
+ public PointIndex selectedPoint = new PointIndex();
+ public PointIndex rangeStart = new PointIndex(), rangeEnd = new PointIndex();
+ public void clear()
+ {
+ selectedPoint.hasValue = false;
+ rangeStart.hasValue = false;
+ rangeEnd.hasValue = false;
+ }
+ /** Get the minimum index which has changed between two sets of parameters */
+ public int getMinChangedIndex(ChartParameters other)
+ {
+ PointIndex minIndex = new PointIndex();
+ if (!selectedPoint.equals(other.selectedPoint)) {
+ minIndex.setMin(selectedPoint);
+ minIndex.setMin(other.selectedPoint);
+ }
+ if (!rangeStart.equals(other.rangeStart)) {
+ minIndex.setMin(rangeStart);
+ minIndex.setMin(other.rangeStart);
+ }
+ if (!rangeEnd.equals(other.rangeEnd)) {
+ minIndex.setMin(rangeEnd);
+ minIndex.setMin(other.rangeEnd);
+ }
+ return minIndex.index;
+ }
+ /** Get the maximum index which has changed between two sets of parameters */
+ public int getMaxChangedIndex(ChartParameters other)
+ {
+ PointIndex maxIndex = new PointIndex();
+ if (!selectedPoint.equals(other.selectedPoint)) {
+ maxIndex.setMax(selectedPoint);
+ maxIndex.setMax(other.selectedPoint);
+ }
+ if (!rangeStart.equals(other.rangeStart)) {
+ maxIndex.setMax(rangeStart);
+ maxIndex.setMax(other.rangeStart);
+ }
+ if (!rangeEnd.equals(other.rangeEnd)) {
+ maxIndex.setMax(rangeEnd);
+ maxIndex.setMax(other.rangeEnd);
+ }
+ return maxIndex.index;
+ }
+ /** @return true if the parameters are completely empty (cleared) */
+ public boolean isEmpty()
+ {
+ return !selectedPoint.hasValue && !rangeStart.hasValue && !rangeEnd.hasValue;
+ }
+ }
+
/** Current scale factor in x direction*/
private double _xScaleFactor = 0.0;
/** Data to show on chart */
private JLabel _label = null;
/** Right-click popup menu */
private JPopupMenu _popup = null;
+ /** Parameters last time chart was drawn */
+ private ChartParameters _previousParameters = new ChartParameters();
/** Possible scales to use */
private static final int[] LINE_SCALES = {10000, 5000, 2000, 1000, 500, 200, 100, 50, 10, 5, 2, 1};
Config.getConfigBoolean(Config.KEY_ANTIALIAS) ? RenderingHints.VALUE_ANTIALIAS_ON : RenderingHints.VALUE_ANTIALIAS_OFF);
ColourScheme colourScheme = Config.getColourScheme();
paintBackground(g, colourScheme);
- if (_track != null && _track.getNumPoints() > 0)
+
+ if (_track == null || _track.getNumPoints() <= 0)
{
- _label.setText(_data.getLabel());
- int width = getWidth();
- int height = getHeight();
-
- // Set up colours
- final Color barColour = colourScheme.getColour(ColourScheme.IDX_POINT);
- final Color rangeColour = colourScheme.getColour(ColourScheme.IDX_SELECTION);
- final Color currentColour = colourScheme.getColour(ColourScheme.IDX_PRIMARY);
- final Color secondColour = colourScheme.getColour(ColourScheme.IDX_SECONDARY);
- final Color lineColour = colourScheme.getColour(ColourScheme.IDX_LINES);
-
- // message if no data for the current field in track
- if (!_data.hasData())
- {
- g.setColor(lineColour);
- g.drawString(I18nManager.getText(_data.getNoDataKey()), 50, (height+_label.getHeight())/2);
- paintChildren(g);
- return;
- }
+ return;
+ }
- // Find minimum and maximum values to plot
- double minValue = _data.getMinValue();
- double maxValue = _data.getMaxValue();
- if (maxValue <= minValue) {maxValue = minValue + 1; minValue--;}
-
- final int numPoints = _track.getNumPoints();
- _xScaleFactor = 1.0 * (width - 2 * BORDER_WIDTH - 1) / numPoints;
- int usableHeight = height - 2 * BORDER_WIDTH - _label.getHeight();
- double yScaleFactor = 1.0 * usableHeight / (maxValue - minValue);
- int barWidth = (int) (_xScaleFactor + 1.0);
- int selectedPoint = _trackInfo.getSelection().getCurrentPointIndex();
- // selection start, end
- int selectionStart = -1, selectionEnd = -1;
- if (_trackInfo.getSelection().hasRangeSelected()) {
- selectionStart = _trackInfo.getSelection().getStart();
- selectionEnd = _trackInfo.getSelection().getEnd();
- }
+ _label.setText(_data.getLabel());
+ int width = getWidth();
+ int height = getHeight();
- // horizontal lines for scale - set to round numbers eg 500
- int lineScale = getLineScale(minValue, maxValue);
- double scaleValue = Math.ceil(minValue/lineScale) * lineScale;
- int x = 0, y = 0;
- final int zeroY = height - BORDER_WIDTH - (int) (yScaleFactor * (0.0 - minValue));
+ // Set up colours
+ final Color barColour = colourScheme.getColour(ColourScheme.IDX_POINT);
+ final Color rangeColour = colourScheme.getColour(ColourScheme.IDX_SELECTION);
+ final Color currentColour = colourScheme.getColour(ColourScheme.IDX_PRIMARY);
+ final Color secondColour = colourScheme.getColour(ColourScheme.IDX_SECONDARY);
+ final Color lineColour = colourScheme.getColour(ColourScheme.IDX_LINES);
- double value = 0.0;
+ // message if no data for the current field in track
+ if (!_data.hasData())
+ {
g.setColor(lineColour);
- if (lineScale >= 1)
- {
- while (scaleValue < maxValue)
- {
- y = height - BORDER_WIDTH - (int) (yScaleFactor * (scaleValue - minValue));
- g.drawLine(BORDER_WIDTH + 1, y, width - BORDER_WIDTH - 1, y);
- scaleValue += lineScale;
- }
- }
- else if (minValue < 0.0)
+ g.drawString(I18nManager.getText(_data.getNoDataKey()), 50, (height+_label.getHeight())/2);
+ paintChildren(g);
+ return;
+ }
+
+ // Find minimum and maximum values to plot
+ double minValue = _data.getMinValue();
+ double maxValue = _data.getMaxValue();
+ if (maxValue <= minValue) {maxValue = minValue + 1; minValue--;}
+
+ final int numPoints = _track.getNumPoints();
+ _xScaleFactor = 1.0 * (width - 2 * BORDER_WIDTH - 1) / numPoints;
+ int usableHeight = height - 2 * BORDER_WIDTH - _label.getHeight();
+ double yScaleFactor = 1.0 * usableHeight / (maxValue - minValue);
+ int barWidth = (int) (_xScaleFactor + 1.0);
+ int selectedPoint = _trackInfo.getSelection().getCurrentPointIndex();
+ // selection start, end
+ int selectionStart = -1, selectionEnd = -1;
+ if (_trackInfo.getSelection().hasRangeSelected()) {
+ selectionStart = _trackInfo.getSelection().getStart();
+ selectionEnd = _trackInfo.getSelection().getEnd();
+ }
+
+ int y = 0;
+ double value = 0.0;
+ // horizontal lines for scale - set to round numbers eg 500
+ final int lineScale = getLineScale(minValue, maxValue);
+ double scaleValue = Math.ceil(minValue/lineScale) * lineScale;
+ final int zeroY = height - BORDER_WIDTH - (int) (yScaleFactor * (0.0 - minValue));
+
+ g.setColor(lineColour);
+ if (lineScale >= 1)
+ {
+ while (scaleValue < maxValue)
{
- // just draw zero line
- y = zeroY;
+ y = height - BORDER_WIDTH - (int) (yScaleFactor * (scaleValue - minValue));
g.drawLine(BORDER_WIDTH + 1, y, width - BORDER_WIDTH - 1, y);
+ scaleValue += lineScale;
}
+ }
+ else if (minValue < 0.0)
+ {
+ // just draw zero line
+ y = zeroY;
+ g.drawLine(BORDER_WIDTH + 1, y, width - BORDER_WIDTH - 1, y);
+ }
- try
+ try
+ {
+ // loop through points
+ g.setColor(barColour);
+ for (int p = 0; p < numPoints; p++)
{
- // loop through points
- g.setColor(barColour);
- for (int p = 0; p < numPoints; p++)
- {
- x = (int) (_xScaleFactor * p) + 1;
- if (p == selectionStart)
- g.setColor(rangeColour);
- else if (p == (selectionEnd+1))
- g.setColor(barColour);
- if (_data.hasData(p))
- {
- value = _data.getData(p);
- // Normal case is the minimum value greater than zero
- if (minValue >= 0)
- {
- y = (int) (yScaleFactor * (value - minValue));
- g.fillRect(BORDER_WIDTH+x, height-BORDER_WIDTH - y, barWidth, y);
- }
- else if (value >= 0.0) {
- // Bar upwards from the zero line
- y = height-BORDER_WIDTH - (int) (yScaleFactor * (value - minValue));
- g.fillRect(BORDER_WIDTH+x, y, barWidth, zeroY - y);
- }
- else {
- // Bar downwards from the zero line
- int barHeight = (int) (yScaleFactor * value);
- g.fillRect(BORDER_WIDTH+x, zeroY, barWidth, -barHeight);
- }
- }
- }
- // current point (make sure it's drawn last)
- if (selectedPoint >= 0)
+ if (p == selectionStart)
+ g.setColor(rangeColour);
+ else if (p == (selectionEnd+1))
+ g.setColor(barColour);
+
+ final int x = (int) (_xScaleFactor * p) + 1;
+ if (_data.hasData(p))
{
- x = (int) (_xScaleFactor * selectedPoint) + 1;
- g.setColor(secondColour);
- g.fillRect(BORDER_WIDTH + x, height-usableHeight-BORDER_WIDTH+1, barWidth, usableHeight-2);
- if (_data.hasData(selectedPoint))
+ value = _data.getData(p);
+ // Normal case is the minimum value greater than zero
+ if (minValue >= 0)
{
- g.setColor(currentColour);
- value = _data.getData(selectedPoint);
y = (int) (yScaleFactor * (value - minValue));
- g.fillRect(BORDER_WIDTH + x, height-BORDER_WIDTH - y, barWidth, y);
+ g.fillRect(BORDER_WIDTH+x, height-BORDER_WIDTH - y, barWidth, y);
+ }
+ else if (value >= 0.0) {
+ // Bar upwards from the zero line
+ y = height-BORDER_WIDTH - (int) (yScaleFactor * (value - minValue));
+ g.fillRect(BORDER_WIDTH+x, y, barWidth, zeroY - y);
+ }
+ else {
+ // Bar downwards from the zero line
+ int barHeight = (int) (yScaleFactor * value);
+ g.fillRect(BORDER_WIDTH+x, zeroY, barWidth, -barHeight);
}
}
}
- catch (NullPointerException npe) { // ignore, probably due to data being changed
- }
- // Draw numbers on top of the graph to mark scale
- if (lineScale >= 1)
+
+ // current point (make sure it's drawn last)
+ if (selectedPoint >= 0)
{
- int textHeight = g.getFontMetrics().getHeight();
- scaleValue = (int) (minValue / lineScale + 1) * lineScale;
- if (minValue < 0.0) {scaleValue -= lineScale;}
- y = 0;
- g.setColor(currentColour);
- while (scaleValue < maxValue)
+ final int sel_x = (int) (_xScaleFactor * selectedPoint) + 1;
+ g.setColor(secondColour);
+ g.fillRect(BORDER_WIDTH + sel_x, height-usableHeight-BORDER_WIDTH+1, barWidth, usableHeight-2);
+ if (_data.hasData(selectedPoint))
{
- y = height - BORDER_WIDTH - (int) (yScaleFactor * (scaleValue - minValue));
- // Limit y so String isn't above border
- if (y < (BORDER_WIDTH + textHeight)) {
- y = BORDER_WIDTH + textHeight;
- }
- g.drawString(""+(int)scaleValue, BORDER_WIDTH + 5, y);
- scaleValue += lineScale;
+ g.setColor(currentColour);
+ value = _data.getData(selectedPoint);
+ y = (int) (yScaleFactor * (value - minValue));
+ g.fillRect(BORDER_WIDTH + sel_x, height-BORDER_WIDTH - y, barWidth, y);
}
}
- // Paint label on top
- paintChildren(g);
}
+ catch (NullPointerException npe) { // ignore, probably due to data being changed
+ }
+ // Draw numbers on top of the graph to mark scale
+ if (lineScale >= 1)
+ {
+ int textHeight = g.getFontMetrics().getHeight();
+ scaleValue = (int) (minValue / lineScale + 1) * lineScale;
+ if (minValue < 0.0) {scaleValue -= lineScale;}
+ y = 0;
+ g.setColor(currentColour);
+ while (scaleValue < maxValue)
+ {
+ y = height - BORDER_WIDTH - (int) (yScaleFactor * (scaleValue - minValue));
+ // Limit y so String isn't above border
+ if (y < (BORDER_WIDTH + textHeight)) {
+ y = BORDER_WIDTH + textHeight;
+ }
+ g.drawString(""+(int)scaleValue, BORDER_WIDTH + 5, y);
+ scaleValue += lineScale;
+ }
+ }
+ // Paint label on top
+ paintChildren(g);
}
inG.setColor(COLOR_NODATA_TEXT);
inG.drawString(I18nManager.getText("display.nodata"), 50, height/2);
}
- else {
+ else
+ {
inG.setColor(borderColour);
inG.drawRect(BORDER_WIDTH, BORDER_WIDTH + _label.getHeight(),
width - 2*BORDER_WIDTH, height-2*BORDER_WIDTH-_label.getHeight());
public void dataUpdated(byte inUpdateType)
{
// Try not to recalculate all the values unless necessary
- if (inUpdateType != SELECTION_CHANGED) {
+ if (inUpdateType != SELECTION_CHANGED)
+ {
_data.init(Config.getUnitSet());
+ _previousParameters.clear();
}
// Update the menu if necessary
if ((inUpdateType & DATA_ADDED_OR_REMOVED) > 0) {
makePopup();
}
- repaint();
+ if (inUpdateType == SELECTION_CHANGED) {
+ triggerPartialRepaint();
+ }
+ else
+ {
+ repaint();
+ }
+ }
+
+ /**
+ * For performance reasons, only repaint the part of the graphics affected by
+ * the change in selection
+ */
+ private void triggerPartialRepaint()
+ {
+ ChartParameters currentParameters = new ChartParameters();
+ currentParameters.selectedPoint.set(_trackInfo.getSelection().getCurrentPointIndex());
+ if (_trackInfo.getSelection().hasRangeSelected())
+ {
+ currentParameters.rangeStart.set(_trackInfo.getSelection().getStart());
+ currentParameters.rangeEnd.set(_trackInfo.getSelection().getEnd());
+ }
+
+ int minPointIndex = currentParameters.getMinChangedIndex(_previousParameters);
+ minPointIndex = Math.max(minPointIndex, 0);
+ int maxPointIndex = currentParameters.getMaxChangedIndex(_previousParameters);
+ if (maxPointIndex < minPointIndex) {
+ maxPointIndex = _trackInfo.getTrack().getNumPoints() - 1;
+ }
+ // System.out.println("Redraw from index: " + minPointIndex + " to " + maxPointIndex);
+ _previousParameters = currentParameters;
+ final int region_x = (int) (_xScaleFactor * minPointIndex) + BORDER_WIDTH;
+ final int region_width = (int) (_xScaleFactor * (maxPointIndex-minPointIndex+2)) + 2;
+ repaint(region_x, 0, region_width, getHeight());
}
/**
shortcut.menu.file.load=L
shortcut.menu.file.save=S
shortcut.menu.track.undo=Z
-shortcut.menu.edit.compress=C
+shortcut.menu.track.compress=C
shortcut.menu.range.all=A
+shortcut.menu.point.edit=R
shortcut.menu.help.help=H
## Functions
shortcut.menu.file.load=N
shortcut.menu.file.save=U
shortcut.menu.track.undo=U
-shortcut.menu.edit.compress=K
+shortcut.menu.track.compress=K
shortcut.menu.range.all=V
+shortcut.menu.point.edit=E
shortcut.menu.help.help=P
# Functions
shortcut.menu.file.load=L
shortcut.menu.file.save=S
shortcut.menu.track.undo=Z
-shortcut.menu.edit.compress=K
+shortcut.menu.track.compress=K
shortcut.menu.range.all=A
+shortcut.menu.point.edit=B
shortcut.menu.help.help=H
# Functions
shortcut.menu.file.load=L
shortcut.menu.file.save=S
shortcut.menu.track.undo=Z
-shortcut.menu.edit.compress=K
+shortcut.menu.track.compress=K
shortcut.menu.range.all=A
+shortcut.menu.point.edit=E
shortcut.menu.help.help=H
# Functions
dialog.displaysettings.wpicon.ringpt=Rundes Schild
dialog.displaysettings.wpicon.plectrum=Plektrum
dialog.displaysettings.wpicon.ring=Chreis
-dialog.displaysettings.wpicon.pin=Sto\u00dfnadel
+dialog.displaysettings.wpicon.pin=Stossnadeli
dialog.displaysettings.size.small=Chli
dialog.displaysettings.size.medium=Mittel
dialog.displaysettings.size.large=Gross
menu.view.browser.mapquest=Mapquest
menu.view.browser.yahoo=Yahoo maps
menu.view.browser.bing=Bing maps
+menu.view.browser.inlinemap=Inline map
+menu.view.browser.graphhopper=GraphHopper
menu.settings=Settings
menu.settings.onlinemode=Load maps from internet
menu.settings.autosave=Autosave settings on exit
shortcut.menu.file.load=L
shortcut.menu.file.save=S
shortcut.menu.track.undo=Z
-shortcut.menu.edit.compress=C
+shortcut.menu.track.compress=C
shortcut.menu.range.all=A
+shortcut.menu.point.edit=E
shortcut.menu.help.help=H
# Functions
shortcut.menu.file.load=C
shortcut.menu.file.save=G
shortcut.menu.track.undo=Z
-shortcut.menu.edit.compress=C
+shortcut.menu.track.compress=C
shortcut.menu.range.all=T
+shortcut.menu.point.edit=E
shortcut.menu.help.help=H
## Functions
function.downloadsrtm=Descargar datos de SRTM
function.getwikipedia=Obtener art\u00edculos de Wikipedia cercanos
function.searchwikipedianames=Buscar en Wikipedia por nombre
+function.searchosmpois=Buscar en OSM cercanos
function.searchopencachingde=Buscar en OpenCaching.de
function.mapillary=Buscar en Mapillary
function.downloadosm=Descargar datos OSM del \u00e1rea
dialog.displaysettings.waypointicons=Iconos de los waypoints
dialog.displaysettings.wpicon.plectrum=Plectro
dialog.displaysettings.wpicon.ring=Anillo
-dialog.displaysettings.size.small=Peque\u00f1o
-dialog.displaysettings.size.medium=Mediano
-dialog.displaysettings.size.large=Grande
+dialog.displaysettings.size.small=Peque\u00f1os
+dialog.displaysettings.size.medium=Medianos
+dialog.displaysettings.size.large=Grandes
dialog.downloadosm.desc=Confirmar la descarga de datos en bruto de OSM para el \u00e1rea especificada.
dialog.searchwikipedianames.search=Buscar:
dialog.weather.location=Localidad
shortcut.menu.file.load=\u062f
shortcut.menu.file.save=\u0630
shortcut.menu.track.undo=\u0638
-shortcut.menu.edit.compress=\u062a
+shortcut.menu.track.compress=\u062a
shortcut.menu.range.all=\u0686
shortcut.menu.help.help=\u0631
shortcut.menu.file.load=L
shortcut.menu.file.save=S
shortcut.menu.track.undo=Z
-shortcut.menu.edit.compress=C
+shortcut.menu.track.compress=C
shortcut.menu.range.all=A
+shortcut.menu.point.edit=M
shortcut.menu.help.help=H
# Functions
menu.view.browser.bing=Cartes Bing
menu.settings=Pr\u00e9f\u00e9rences
menu.settings.onlinemode=Charger cartes depuis internet
-dialog.displaysettings.antialias=Anticr\u00e9nelage
menu.settings.autosave=Sauver automatiquement en quittant
menu.help=Aide
# Popup menu for map
shortcut.menu.file.load=T
shortcut.menu.file.save=E
shortcut.menu.track.undo=Z
-shortcut.menu.edit.compress=C
+shortcut.menu.track.compress=C
shortcut.menu.range.all=S
+shortcut.menu.point.edit=D
shortcut.menu.help.help=A
# Functions
function.downloadsrtm=T\u00e9l\u00e9charger les donn\u00e9es SRTM
function.getwikipedia=Obtenir les articles de Wikip\u00e9dia \u00e0 proximit\u00e9
function.searchwikipedianames=Rechercher dans Wikip\u00e9dia par nom
+function.searchosmpois=Rechercher dans OSM \u00e0 proximit\u00e9
function.searchopencachingde=Rechercher dans OpenCaching.de
function.mapillary=Rechercher dans Mapillary
function.downloadosm=T\u00e9l\u00e9charger les donn\u00e9es OSM de la zone
function.duplicatepoint=Dupliquer le point
function.setcolours=Choisir les couleurs
+function.setdisplaysettings=Pr\u00e9f\u00e9rences graphiques
function.setlanguage=Choisir la langue
function.connecttopoint=Relier au point
function.disconnectfrompoint=D\u00e9tacher du point
function.managetilecache=Gestion du cache des dalles de cartes
function.getweatherforecast=Obtenir une pr\u00e9vision m\u00e9t\u00e9orologique
function.setaltitudetolerance=Variation de d\u00e9nivel\u00e9 ignor\u00e9e
+function.selecttimezone=Choisir le fuseau horaire
# Dialogs
dialog.exit.confirm.title=Quitter GpsPrune
dialog.wikipedia.column.distance=Distance
dialog.wikipedia.nonefound=Aucune points trouv\u00e9e
dialog.wikipedia.gallery=Galerie
+dialog.osmpois.column.name=Nom
+dialog.osmpois.column.type=Type
+dialog.osmpois.nonefound=Aucune points trouv\u00e9e
dialog.geocaching.nonefound=Aucun g\u00e9ocaches trouv\u00e9e
dialog.correlate.notimestamps=Les points n'ont pas d'indication de temps, il n'est pas possible de les corr\u00e9ler.
dialog.correlate.nouncorrelatedphotos=Il n'y a pas de photos non-corr\u00e9l\u00e9es.\nVoulez-vous continuer ?
dialog.deletefieldvalues.intro=Choisir le champ \u00e0 effacer pour l'\u00e9tendue actuelle
dialog.deletefieldvalues.nofields=L'\u00e9tendue actuelle n'a pas de champs \u00e0 effacer
dialog.displaysettings.linewidth=L'\u00e9paisseur des lignes des traces (1-4)
+dialog.displaysettings.antialias=Anticr\u00e9nelage
+dialog.displaysettings.size.small=Petit
+dialog.displaysettings.size.medium=Moyen
+dialog.displaysettings.size.large=Grand
dialog.downloadosm.desc=Confirmer le t\u00e9l\u00e9chargement des donn\u00e9es OSM brutes pour la zone indiqu\u00e9e :
dialog.searchwikipedianames.search=Chercher :
dialog.weather.location=Location
shortcut.menu.file.load=L
shortcut.menu.file.save=S
shortcut.menu.track.undo=Z
-shortcut.menu.edit.compress=C
+shortcut.menu.track.compress=C
shortcut.menu.range.all=A
shortcut.menu.help.help=H
shortcut.menu.file.load=M
shortcut.menu.file.save=S
shortcut.menu.track.undo=Z
-shortcut.menu.edit.compress=P
+shortcut.menu.track.compress=P
shortcut.menu.range.all=-
shortcut.menu.help.help=-
shortcut.menu.file.load=C
shortcut.menu.file.save=S
shortcut.menu.track.undo=Z
-shortcut.menu.edit.compress=C
+shortcut.menu.track.compress=C
shortcut.menu.range.all=T
+shortcut.menu.point.edit=E
shortcut.menu.help.help=H
# Functions
shortcut.menu.file.load=L
shortcut.menu.file.save=S
shortcut.menu.track.undo=Z
-shortcut.menu.edit.compress=C
+shortcut.menu.track.compress=C
shortcut.menu.range.all=A
shortcut.menu.help.help=H
shortcut.menu.file.load=L
shortcut.menu.file.save=S
shortcut.menu.track.undo=Z
-shortcut.menu.edit.compress=C
+shortcut.menu.track.compress=C
shortcut.menu.range.all=A
shortcut.menu.help.help=H
shortcut.menu.file.load=L
shortcut.menu.file.save=S
shortcut.menu.track.undo=Z
-shortcut.menu.edit.compress=C
+shortcut.menu.track.compress=C
shortcut.menu.range.all=A
+shortcut.menu.point.edit=W
shortcut.menu.help.help=H
# Functions
shortcut.menu.file.load=
shortcut.menu.file.save=L
shortcut.menu.track.undo=g
-shortcut.menu.edit.compress=K
+shortcut.menu.track.compress=K
shortcut.menu.range.all=A
+shortcut.menu.point.edit=R
shortcut.menu.help.help=H
# Functions
menu.view.browser.bing=Mapy Bing
menu.settings=Ustawienia
menu.settings.onlinemode=\u0141aduj mapy z sieci
-dialog.displaysettings.antialias=U\u017Cyj antyaliasingu
menu.settings.autosave=Autozapis ustawie\u0144 przy wyj\u015bciu
menu.help=Pomoc
# Popup menu for map
shortcut.menu.file.load=L
shortcut.menu.file.save=S
shortcut.menu.track.undo=Z
-shortcut.menu.edit.compress=C
+shortcut.menu.track.compress=C
shortcut.menu.range.all=A
+shortcut.menu.point.edit=E
shortcut.menu.help.help=H
# Functions
function.downloadosm=Za\u0142aduj dane obszaru z OSM
function.duplicatepoint=Duplikuj plik
function.setcolours=Ustaw kolory
+function.setdisplaysettings=Ustawienia wy\u015bwietlacza
function.setlanguage=Zmie\u0144 j\u0119zyk
function.connecttopoint=Przy\u0142\u0105cz do punktu
function.disconnectfrompoint=Od\u0142\u0105cz od punktu
dialog.deletefieldvalues.intro=Wybierz pola do skasowania z wybranego zakresu
dialog.deletefieldvalues.nofields=Brak p\u00f3l do skasowania dla tego zakresu
dialog.displaysettings.linewidth=Wprowad\u017a grubo\u015b\u0107 linii do rysowania \u015bcie\u017cek
+dialog.displaysettings.antialias=U\u017Cyj antyaliasingu
+dialog.displaysettings.size.small=Ma\u0142e
+dialog.displaysettings.size.medium=\u015arednie
+dialog.displaysettings.size.large=Du\u017ce
dialog.downloadosm.desc=Potwierd\u017a \u015bci\u0105gni\u0119cie danych dla tego obszaru z OSM:
dialog.searchwikipedianames.search=Szukaj
dialog.weather.location=Pozycja
shortcut.menu.file.load=C
shortcut.menu.file.save=S
shortcut.menu.track.undo=Z
-shortcut.menu.edit.compress=C
+shortcut.menu.track.compress=C
shortcut.menu.range.all=T
+shortcut.menu.point.edit=E
shortcut.menu.help.help=J
# Functions
dialog.pastecoordinates.desc=Insira ou cole as coordenadas aqui
dialog.pastecoordinates.coords=Coordenadas
dialog.pastecoordinates.nothingfound=Por favor, verifique as coordenadas novamente
-dialog.help.help=Por favor, veja\n http://gpsprune.activityworkshop.net/\npara mais informa\u00e7\u00f5es e guia do usu\u00e1rio.
+dialog.help.help=Por favor, veja\n https://gpsprune.activityworkshop.net/\npara mais informa\u00e7\u00f5es e guia do usu\u00e1rio.
dialog.about.version=Vers\u00e3o
dialog.about.build=Compila\u00e7\u00e3o
dialog.about.summarytext1=GpsPrune \u00e9 um programa para carregar, exibir e editar dados de receptores de GPS.
dialog.about.summarytext2=Isto est\u00e1 lan\u00e7ado sob a Gnu GPL para uso e melhoria livre, aberto e em todo o mundo.<br>A c\u00f3pia, redistribui\u00e7\u00e3o e modifica\u00e7\u00e3o s\u00e3o permitidas e encorajadas<br>de acordo coma as condi\u00e7\u00f5es no arquivo <code>license.txt</code>inclu\u00eddo.
-dialog.about.summarytext3=Por favor, veja <code style="font-weight:bold">http://activityworkshop.net/</code> para mais informa\u00e7\u00f5es e guia do usu\u00e1rio.
+dialog.about.summarytext3=Por favor, veja <code style="font-weight:bold">https://activityworkshop.net/</code> para mais informa\u00e7\u00f5es e guia do usu\u00e1rio.
dialog.about.languages=Idiomas dispon\u00edveis
dialog.about.translatedby=Texto em portugu\u00eas por Marcus Gama.
dialog.about.systeminfo=Informa\u00e7\u00f5es do sistema
dialog.checkversion.newversion2=.
dialog.checkversion.releasedate1=Esta nova vers\u00e3o foi lan\u00e7ada em
dialog.checkversion.releasedate2=.
-dialog.checkversion.download=Para baixar a nova vers\u00e3o, v\u00e1 para http://gpsprune.activityworkshop.net/download.html.
+dialog.checkversion.download=Para baixar a nova vers\u00e3o, v\u00e1 para https://gpsprune.activityworkshop.net/download.html.
dialog.keys.intro=Voc\u00ea pode usar os seguintes atalhos de teclado ao inv\u00e9s de usar o mouse
dialog.keys.keylist=<table><tr><td>Cursores</td><td>Move o mapa para esquerda, direita, acima e abaixo</td></tr><tr><td>Ctrl + cursores esquerdo e direito</td><td>Seleciona o pr\u00f3ximo ponto ou o anterior</td></tr><tr><td>Ctrl + cursores acima e abaixo</td><td>Amplia ou reduz</td></tr><tr><td>Del</td><td>Remove o ponto atual</td></tr></table>
dialog.keys.normalmodifier=Ctrl
shortcut.menu.file.load=I
shortcut.menu.file.save=S
shortcut.menu.track.undo=Z
-shortcut.menu.edit.compress=C
+shortcut.menu.track.compress=C
shortcut.menu.range.all=T
+shortcut.menu.point.edit=E
shortcut.menu.help.help=A
# Functions
dialog.pastecoordinates.desc=Scrie\u021bi sau copia\u021bi aici coordonatele
dialog.pastecoordinates.coords=Coordonate
dialog.pastecoordinates.nothingfound=V\u0103 rug\u0103m verifica\u021bi coordonatele \u0219i \u00eencerca\u021bi din nou.
-dialog.help.help=V\u0103 rug\u0103m vizita\u021bi \n http://gpsprune.activityworkshop.net/\npentru mai multe informa\u021bii, inclusiv un nou manual PDF care poate fi cump\u0103rat.
+dialog.help.help=V\u0103 rug\u0103m vizita\u021bi \n https://gpsprune.activityworkshop.net/\npentru mai multe informa\u021bii, inclusiv un nou manual PDF care poate fi cump\u0103rat.
dialog.about.version=Versiunea
dialog.about.build=Versiunea minor\u0103
dialog.about.summarytext1=GpsPrune e o aplica\u021bie pentru \u00eenc\u0103rcarea, afi\u0219area \u0219i editarea datelor salvate de receptoarele GPS.
dialog.about.summarytext2=Este distribuit\u0103 sub licen\u021b\u0103 Gnu GPL pentru a permite utilizarea gratuit\u0103 \u00een lumea \u00eentreag\u0103<br>\u0219i pentru a permite oricui dore\u0219te \u00eembun\u0103t\u0103\u021biea aplica\u021biei.<br>Copierea, redistribuirea \u0219i modificarea sunt permise \u0219i \u00eencurajate<br>\u00een conformitate cu condi\u021biile descrise \u00een fi\u0219ierul <code>license.txt</code> care este inclus \u00een aplica\u021bie.
-dialog.about.summarytext3=V\u0103 rug\u0103m vizita\u021bi <code style="font-weight:bold">http://activityworkshop.net/</code> pentru mai multe informa\u021bii \u0219i indicii, inclusiv<br>un nou manual \u00een format PDF care poate fi cump\u0103rat.
+dialog.about.summarytext3=V\u0103 rug\u0103m vizita\u021bi <code style="font-weight:bold">https://activityworkshop.net/</code> pentru mai multe informa\u021bii \u0219i indicii, inclusiv<br>un nou manual \u00een format PDF care poate fi cump\u0103rat.
dialog.about.languages=Traduceri
dialog.about.translatedby=Textele romanesti sunt de Rothermographer, Oana \u0219i Cristian
dialog.about.systeminfo=Informa\u0163ii sistem
dialog.checkversion.newversion2=.
dialog.checkversion.releasedate1=Aceast\u0103 versiune nou\u0103 a fost lansat\u0103 la
dialog.checkversion.releasedate2=.
-dialog.checkversion.download=Pentru a desc\u0103rca noua versiune merge\u021bi la http://gpsprune.activityworkshop.net/download.html.
+dialog.checkversion.download=Pentru a desc\u0103rca noua versiune merge\u021bi la https://gpsprune.activityworkshop.net/download.html.
dialog.keys.intro=Pute\u021bi folosi urm\u0103toarele scurt\u0103turi \u00een locul mouse-ului
dialog.keys.keylist=<table><tr><td>Taste s\u0103ge\u021bi</td><td>Mut\u0103 harta st\u00e2nga, dreapta, sus, jos</td></tr><tr><td>Ctrl + s\u0103geat\u0103 st\u00e2nga, dreapta</td><td>Selecteaz\u0103 punctul anterior sau urm\u0103tor</td></tr><tr><td>Ctrl + s\u0103geat\u0103 sus, jos</td><td>Aproprie sau \u00eendep\u0103rteaz\u0103</td></tr><tr><td>Ctrl + PgUp, PgDown</td><td>Selecteaz\u0103 segmentul anterior sau urm\u0103tor</td></tr><tr><td>Ctrl + Home, End</td><td>Selecteaz\u0103 primul, ultimul punct</td></tr><tr><td>Del</td><td>\u0218terge punctul curent</td></tr></table>
dialog.keys.normalmodifier=Ctrl
shortcut.menu.file.load=L
shortcut.menu.file.save=S
shortcut.menu.track.undo=Z
-shortcut.menu.edit.compress=C
+shortcut.menu.track.compress=C
shortcut.menu.range.all=A
+shortcut.menu.point.edit=E
shortcut.menu.help.help=H
# Functions
dialog.pastecoordinates.desc=\u0417\u0430\u0434\u0430\u0439\u0442\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0437\u0434\u0435\u0441\u044c
dialog.pastecoordinates.coords=\u041a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b
dialog.pastecoordinates.nothingfound=\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437
-dialog.help.help=\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044c \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443\nhttp://gpsprune.activityworkshop.net/
+dialog.help.help=\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044c \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443\nhttps://gpsprune.activityworkshop.net/
dialog.about.version=\u0412\u0435\u0440\u0441\u0438\u044f
dialog.about.build=\u0420\u0435\u0432\u0438\u0437\u0438\u044f
dialog.about.summarytext1=GpsPrune \u044d\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 GPS \u043f\u0440\u0438\u0435\u043c\u043d\u0438\u043a\u043e\u0432.
dialog.checkversion.newversion2=
dialog.checkversion.releasedate1=\u042d\u0442\u0430 \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0431\u044b\u043b\u0430 \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u0430
dialog.checkversion.releasedate2=
-dialog.checkversion.download=\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e, \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 http://gpsprune.activityworkshop.net/download.html
+dialog.checkversion.download=\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e, \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 https://gpsprune.activityworkshop.net/download.html
dialog.keys.intro=\u0412\u043c\u0435\u0441\u0442\u043e \u043c\u044b\u0448\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0433\u043e\u0440\u044f\u0447\u0438\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438
dialog.keys.keylist=<table><tr><td></td><td>\u0421\u0434\u0432\u0438\u0433 \u043a\u0430\u0440\u0442\u044b \u0432\u043b\u0435\u0432\u043e, \u0432\u043f\u0440\u0430\u0432\u043e, \u0432\u0432\u0435\u0440\u0445, \u0432\u043d\u0438\u0437</td><td><tr><td>Ctrl + \u043b\u0435\u0432\u0430\u044f, \u043f\u0440\u0430\u0432\u0430\u044f \u0441\u0442\u0440\u0435\u043b\u043a\u0430</td><td>\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u0438\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0442\u043e\u0447\u043a\u0443</td></tr><tr><td>Ctrl + \u0441\u0442\u0440\u0435\u043b\u043a\u0438 \u0432\u0432\u0435\u0440\u0445, \u0432\u043d\u0438\u0437 </td><td> \u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430</td></tr><tr><td>Ctrl + PgUp, PgDown</td><td>\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0435\u0433\u043c\u0435\u043d\u0442</td></tr><tr><td>Ctrl + Home, End</td><td>\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0435\u0440\u0432\u0443\u044e, \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0442\u043e\u0447\u043a\u0443</td></tr><tr><td>Del</td><td>\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0442\u043e\u0447\u043a\u0443</td></tr></table>
dialog.keys.normalmodifier=Ctrl
shortcut.menu.file.load=L
shortcut.menu.file.save=K
shortcut.menu.track.undo=Z
-shortcut.menu.edit.compress=C
+shortcut.menu.track.compress=C
shortcut.menu.range.all=A
shortcut.menu.help.help=Y
dialog.correlate.options.photolater=Foto noktadan sonra
dialog.correlate.options.pointlaterphoto=Nokta fotodan sonra
dialog.pastecoordinates.coords=Koordinatlar
-dialog.help.help=Ayr\u0131nt\u0131l\u0131 bilgi ve kullanma k\u0131lavuzu i\u00e7in l\u00fctfen\n http://gpsprune.activityworkshop.net/\n sitesinde bak.
+dialog.help.help=Ayr\u0131nt\u0131l\u0131 bilgi ve kullanma k\u0131lavuzu i\u00e7in l\u00fctfen\n https://gpsprune.activityworkshop.net/\n sitesinde bak.
dialog.about.version=S\u00fcr\u00fcm
dialog.about.build=Build
dialog.about.summarytext1=GpsPrune GPS ayg\u0131tlardan veri y\u00fckler, g\u00f6r\u00fcnt\u00fcler ver d\u00fczenler bir uygulamad\u0131r.
-dialog.about.summarytext3=Ayr\u0131nt\u0131l\u0131 bilgi ve kullanma k\u0131lavuzu i\u00e7in l\u00fctfen\n <code style="font-weight:bold">http://activityworkshop.net/</code> sitesinde bak.
+dialog.about.summarytext3=Ayr\u0131nt\u0131l\u0131 bilgi ve kullanma k\u0131lavuzu i\u00e7in l\u00fctfen\n <code style="font-weight:bold">https://activityworkshop.net/</code> sitesinde bak.
dialog.about.languages=GpsPrune ile kullanabilir diller
dialog.about.translatedby=Turkish text by katpatuka
dialog.about.systeminfo=Sistem bilgisi
dialog.checkversion.newversion2=.
dialog.checkversion.releasedate1=Yeni s\u00fcr\u00fcm\u00fcn\u00fcn devir tarihi
dialog.checkversion.releasedate2=.
-dialog.checkversion.download=Yeni s\u00fcr\u00fcm indirmek i\u00e7in http://gpsprune.activityworkshop.net/download.html adresine git.
+dialog.checkversion.download=Yeni s\u00fcr\u00fcm indirmek i\u00e7in https://gpsprune.activityworkshop.net/download.html adresine git.
dialog.keys.intro=Fare yerinde a\u015fa\u011f\u0131daki k\u0131sayol tu\u015flar\u0131 kullanabilirsin:
dialog.keys.keylist=<table><tr><td>Ok tu\u015flar\u0131</td><td>Haritay\u0131 sola/sa\u011fa/a\u015fa\u011f\u0131/yukar\u0131 kayd\u0131r</td></tr><tr><td>Ctrl + sol, sa\u011f</td><td>\u00d6nceki/sonraki noktay\u0131 se\u00e7</td></tr><tr><td>Ctrl + yukar/a\u015fa\u011f\u0131</td><td>Yak\u0131nla\u015ft\u0131r/Uzakla\u015ft\u0131r</td></tr><tr><td>Del</td><td>Se\u00e7ili noltay\u0131 sil</td></tr></table>
dialog.saveconfig.desc=A\u011fa\u015f\u0131daki ayarlar\u0131 bir dasyada kaydedilir:
shortcut.menu.file.load=L
shortcut.menu.file.save=S
shortcut.menu.track.undo=Z
-shortcut.menu.edit.compress=C
+shortcut.menu.track.compress=C
shortcut.menu.range.all=A
shortcut.menu.help.help=H
shortcut.menu.file.load=L
shortcut.menu.file.save=S
shortcut.menu.track.undo=Z
-shortcut.menu.edit.compress=C
+shortcut.menu.track.compress=C
shortcut.menu.range.all=A
shortcut.menu.help.help=H
dialog.pastecoordinates.desc=\u5728\u6b64\u8f93\u5165\u6216\u7c98\u8d34\u5750\u6807\u70b9
dialog.pastecoordinates.coords=\u5750\u6807\u70b9
dialog.pastecoordinates.nothingfound=\u8bf7\u68c0\u67e5\u5750\u6807\u6570\u636e\u5e76\u91cd\u8bd5
-dialog.help.help=\u66f4\u591a\u4fe1\u606f\u548c\u7528\u6cd5\uff0c\u8bf7\u53c2\u8003\u7f51\u7ad9\nhttp://gpsprune.activityworkshop.net///
+dialog.help.help=\u66f4\u591a\u4fe1\u606f\u548c\u7528\u6cd5\uff0c\u8bf7\u53c2\u8003\u7f51\u7ad9\nhttps://gpsprune.activityworkshop.net///
dialog.about.version=\u7248\u672c
dialog.about.build=Build
dialog.about.summarytext1=GpsPrune\u662f\u4e00\u4e2a\u4eceGPS\u4e2d\u5bfc\u5165\u6570\u636e\uff0c\u663e\u793a\u6570\u636e\u548c\u7f16\u8f91\u6570\u636e\u7684\u8f6f\u4ef6
dialog.about.summarytext2=\u5b83\u7684\u53d1\u884c\u662f\u57fa\u4e8eGnu GPL\u89c4\u5219\uff0c\u662f\u514d\u8d39\u7684\uff0c\u5f00\u653e\u5f0f\u7684\uff0c\u5168\u4e16\u754c\u5171\u7528\u5e76\u6539\u5584\u589e\u5f3a\u5176\u529f\u80fd<br>\u5728\u7b26\u5408"license.txt"\u6761\u4ef6\u4e0b\uff0c\u5bb9\u8bb8\u5e76\u9f13\u52b1\u590d\u5236\uff0c\u5206\u53d1\u53ca\u4fee\u6539\u3002
-dialog.about.summarytext3=\u66f4\u591a\u4fe1\u606f\u53ca\u7528\u6cd5\u6307\u5357\uff0c\u8bf7\u53c2\u8003\u7f51\u7ad9\uff1a<br>http:activityworkshop.net/
+dialog.about.summarytext3=\u66f4\u591a\u4fe1\u606f\u53ca\u7528\u6cd5\u6307\u5357\uff0c\u8bf7\u53c2\u8003\u7f51\u7ad9\uff1a<br>https://activityworkshop.net/
dialog.about.languages=\u652f\u6301\u8bed\u8a00
dialog.about.translatedby=\u4e2d\u6587\u7ffb\u8bd1\uff1a\u9ed1\u8001\u9648 (Sam Chen)
dialog.about.systeminfo=\u7cfb\u7edf\u4fe1\u606f
dialog.checkversion.newversion2=
dialog.checkversion.releasedate1=\u65b0\u7248\u672c\u53d1\u884c\u4e8e
dialog.checkversion.releasedate2=
-dialog.checkversion.download=\u4e0b\u8f7d\u6700\u65b0\u7248\u672c\uff0c\u8bf7\u767b\u9646\u7f51\u7ad9\uff1a\nhttp:gpsprune.activityworkshop.net/download.html
+dialog.checkversion.download=\u4e0b\u8f7d\u6700\u65b0\u7248\u672c\uff0c\u8bf7\u767b\u9646\u7f51\u7ad9\uff1a\nhttps://gpsprune.activityworkshop.net/download.html
dialog.keys.intro=\u53ef\u7528\u4e0b\u5217\u5feb\u6377\u952e\u66ff\u4ee3\u9f20\u6807
dialog.keys.keylist=<table><tr><td>\u7bad\u5934</td><td>\u4e0a\u4e0b\u5de6\u53f3\u79fb\u52a8\u5730\u56fe</td></tr><tr><td>Ctrl + \u5de6\u53f3\u7bad\u5934</td><td>\u9009\u53d6\u524d\uff0c\u540e\u70b9</td></tr><tr><td>Ctrl + \u4e0a\u4e0b\u7bad\u5934</td><td>\u653e\u5927\u7f29\u5c0f</td></tr><tr><td>Ctrl + PgUp, PgDown</td><td>\u9009\u62e9\u524d\u540e\u6bb5</td></tr><tr><td>Ctrl + Home, End</td><td>\u9009\u62e9\u9996\u672b\u70b9</td></tr><tr><td>Del</td><td>\u5220\u9664\u5f53\u524d\u70b9</td></tr></table>
dialog.keys.normalmodifier=Ctrl
-GpsPrune version 19
-===================
+GpsPrune version 19.1
+=====================
GpsPrune is an application for viewing, editing and managing coordinate data from GPS systems,
including format conversion, charting, 3d visualisation, audio and photo correlation, and online resource lookup.
=======
To run GpsPrune from the jar file, simply call it from a command prompt or shell:
- java -jar gpsprune_19.jar
+ java -jar gpsprune_19.1.jar
If the jar file is saved in a different directory, you will need to include the path.
Depending on your system settings, you may be able to click or double-click on the jar file
or other link can of course be made should you wish.
To specify a language other than the default, use an additional parameter, eg:
- java -jar gpsprune_19.jar --lang=DE
+ java -jar gpsprune_19.1.jar --lang=DE
+New with version 19.1
+=====================
+The following fixes and additions were made since version 19:
+ - Performance improvements regarding scrolling through points
+ - Keyboard shortcut to access point edit dialog (part of Github issue #10)
+ - Online services Inlinemap.net and Graphhopper.com (routing)
+ - Cardinals in java3d view get billboard behaviour to always face camera (thanks, PeHar)
+ - Fix for PeakFinder urls
+
New with version 19
===================
The following fixes and additions were made since version 18:
import javax.media.j3d.AmbientLight;
import javax.media.j3d.Appearance;
+import javax.media.j3d.Billboard;
import javax.media.j3d.BoundingSphere;
import javax.media.j3d.BranchGroup;
import javax.media.j3d.Canvas3D;
Font3D compassFont = new Font3D(
new Font(CARDINALS_FONT, Font.PLAIN, 1),
new FontExtrusion(bevelPath));
- objTrans.addChild(createCompassPoint(I18nManager.getText("cardinal.n"), new Point3f(0f, 0f, -10f), compassFont));
- objTrans.addChild(createCompassPoint(I18nManager.getText("cardinal.s"), new Point3f(0f, 0f, 10f), compassFont));
- objTrans.addChild(createCompassPoint(I18nManager.getText("cardinal.w"), new Point3f(-11f, 0f, 0f), compassFont));
- objTrans.addChild(createCompassPoint(I18nManager.getText("cardinal.e"), new Point3f(10f, 0f, 0f), compassFont));
+ objTrans.addChild(createCompassPoint(I18nManager.getText("cardinal.n"), new Point3f(0f, 0f, -11.5f), compassFont));
+ objTrans.addChild(createCompassPoint(I18nManager.getText("cardinal.s"), new Point3f(0f, 0f, 11.5f), compassFont));
+ objTrans.addChild(createCompassPoint(I18nManager.getText("cardinal.w"), new Point3f(-11.5f, 0f, 0f), compassFont));
+ objTrans.addChild(createCompassPoint(I18nManager.getText("cardinal.e"), new Point3f(11.5f, 0f, 0f), compassFont));
// Add points to model
objTrans.addChild(createDataPoints(_model));
/**
* Create a text object for compass point, N S E or W
- * @param text text to display
- * @param locn position at which to display
- * @param font 3d font to use
- * @return Shape3D object
+ * @param inText text to display
+ * @param inLocn position at which to display
+ * @param inFont 3d font to use
+ * @return compound object
*/
- private Shape3D createCompassPoint(String inText, Point3f inLocn, Font3D inFont)
+ private TransformGroup createCompassPoint(String inText, Point3f inLocn, Font3D inFont)
{
Text3D txt = new Text3D(inFont, inText, inLocn, Text3D.ALIGN_FIRST, Text3D.PATH_RIGHT);
Material mat = new Material(new Color3f(0.5f, 0.5f, 0.55f),
Appearance app = new Appearance();
app.setMaterial(mat);
Shape3D shape = new Shape3D(txt, app);
- return shape;
+
+ // Make transform group with billboard behaviour
+ TransformGroup subGroup = new TransformGroup();
+ subGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
+ subGroup.addChild(shape);
+ Billboard billboard = new Billboard(subGroup, Billboard.ROTATE_ABOUT_POINT, inLocn);
+ BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0), 100.0);
+ billboard.setSchedulingBounds(bounds);
+ subGroup.addChild(billboard);
+ return subGroup;
}