Change classpath for GPX Utilitites and basic refactoring
This commit is contained in:
parent
a196c4b11c
commit
c2eb1bb585
1 changed files with 17 additions and 0 deletions
|
@ -256,6 +256,10 @@ public class GPXUtilities {
|
|||
&& Algorithms.objectEquals(other.lon, lon)
|
||||
&& Algorithms.objectEquals(other.desc, desc);
|
||||
}
|
||||
|
||||
public boolean hasLocation() {
|
||||
return (lat != 0 && lon != 0);
|
||||
}
|
||||
}
|
||||
|
||||
public static class TrkSegment extends GPXExtensions {
|
||||
|
@ -838,6 +842,19 @@ public class GPXUtilities {
|
|||
this.author = author;
|
||||
}
|
||||
|
||||
public GPXFile(String title, String lang, String description) {
|
||||
this.metadata = new Metadata();
|
||||
if(description != null) {
|
||||
metadata.extensions.put("desc", description);
|
||||
}
|
||||
if(lang != null) {
|
||||
metadata.extensions.put("article_lang", lang);
|
||||
}
|
||||
if(title != null) {
|
||||
metadata.extensions.put("article_title", title);
|
||||
}
|
||||
}
|
||||
|
||||
public List<WptPt> getPoints() {
|
||||
return Collections.unmodifiableList(points);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue