Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions brouter-core/src/main/java/btools/router/OsmTrack.java
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ public String formatAsGpx(BufferedWriter sb) throws IOException {
return sb.toString();
}

static public String formatAsGpxWaypoint(OsmNodeNamed n) {
public String formatAsGpxWaypoint(OsmNodeNamed n) {
try {
StringWriter sw = new StringWriter(8192);
BufferedWriter bw = new BufferedWriter(sw);
Expand All @@ -854,7 +854,7 @@ static public String formatAsGpxWaypoint(OsmNodeNamed n) {
}
}

static public void formatGpxHeader(BufferedWriter sb) throws IOException {
public void formatGpxHeader(BufferedWriter sb) throws IOException {
sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
sb.append("<gpx \n");
sb.append(" xmlns=\"http://www.topografix.com/GPX/1/1\" \n");
Expand All @@ -863,11 +863,11 @@ static public void formatGpxHeader(BufferedWriter sb) throws IOException {
sb.append(" creator=\"BRouter-" + version + "\" version=\"1.1\">\n");
}

static public void formatGpxFooter(BufferedWriter sb) throws IOException {
public void formatGpxFooter(BufferedWriter sb) throws IOException {
sb.append("</gpx>\n");
}

static public void formatWaypointGpx(BufferedWriter sb, OsmNodeNamed n) throws IOException {
public void formatWaypointGpx(BufferedWriter sb, OsmNodeNamed n) throws IOException {
sb.append(" <wpt lon=\"").append(formatILon(n.ilon)).append("\" lat=\"")
.append(formatILat(n.ilat)).append("\">");
if (n.getSElev() != Short.MIN_VALUE) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ public void doGetElev() {
OsmNodeNamed n = new OsmNodeNamed(listOne.get(0).crosspoint);
n.selev = startNode != null ? startNode.getSElev() : Short.MIN_VALUE;

outputMessage = OsmTrack.formatAsGpxWaypoint(n);
outputMessage = new OsmTrack().formatAsGpxWaypoint(n);

long endTime = System.currentTimeMillis();
logInfo("execution time = " + (endTime - startTime) / 1000. + " seconds");
Expand Down