public final class WayPoint extends Object implements Point, Serializable
WayPoint
represents a way-point, point of interest, or named
feature on a map.
Creating a WayPoint
:
final WayPoint point = WayPoint.builder()
.lat(48.2081743).lon(16.3738189).ele(160)
.build();
Modifier and Type | Class and Description |
---|---|
static class |
WayPoint.Builder
Builder for creating a way-point with different parameters.
|
Modifier and Type | Method and Description |
---|---|
static WayPoint.Builder |
builder()
Return a new
WayPoint builder. |
boolean |
equals(Object obj) |
Optional<Duration> |
getAgeOfGPSData()
Return the number of seconds since last DGPS update.
|
Optional<String> |
getComment()
The GPS way-point comment.
|
Optional<String> |
getDescription()
Return a text description of the element.
|
Optional<DGPSStation> |
getDGPSID()
Return the ID of DGPS station used in differential correction.
|
Optional<Length> |
getElevation()
The elevation (in meters) of the point.
|
Optional<Fix> |
getFix()
Return the type of GPX fix.
|
Optional<Length> |
getGeoidHeight()
The height (in meters) of geoid (mean sea level) above WGS84 earth
ellipsoid.
|
Optional<Double> |
getHdop()
Return the horizontal dilution of precision.
|
Latitude |
getLatitude()
The latitude of the point, WGS84 datum.
|
List<Link> |
getLinks()
Return the links to additional information about the way-point.
|
Longitude |
getLongitude()
The longitude of the point, WGS84 datum.
|
Optional<Degrees> |
getMagneticVariation()
The magnetic variation at the point.
|
Optional<String> |
getName()
The GPS name of the way-point.
|
Optional<Double> |
getPdop()
Return the position dilution of precision.
|
Optional<UInt> |
getSat()
Return the number of satellites used to calculate the GPX fix.
|
Optional<String> |
getSource()
Return the source of data.
|
Optional<Speed> |
getSpeed()
The current GPS speed.
|
Optional<String> |
getSymbol()
Return the text of GPS symbol name.
|
Optional<ZonedDateTime> |
getTime()
Creation/modification timestamp for the point.
|
Optional<String> |
getType()
Return the type (classification) of the way-point.
|
Optional<Double> |
getVdop()
Return the vertical dilution of precision.
|
int |
hashCode() |
static WayPoint |
of(double latitudeDegree,
double longitudeDegree)
Create a new
WayPoint with the given latitude and
longitude value. |
static WayPoint |
of(double latitudeDegree,
double longitudeDegree,
double elevationMeter,
long timeEpochMilli)
Create a new
WayPoint with the given parameters. |
static WayPoint |
of(double latitudeDegree,
double longitudeDegree,
long timeEpochMilli)
Create a new
WayPoint with the given parameters. |
static WayPoint |
of(Latitude latitude,
Longitude longitude)
Create a new
WayPoint with the given latitude and
longitude value. |
static WayPoint |
of(Latitude latitude,
Longitude longitude,
Length elevation,
Speed speed,
ZonedDateTime time,
Degrees magneticVariation,
Length geoidHeight,
String name,
String comment,
String description,
String source,
List<Link> links,
String symbol,
String type,
Fix fix,
UInt sat,
Double hdop,
Double vdop,
Double pdop,
Duration ageOfGPSData,
DGPSStation dgpsID)
Create a new way-point with the given parameter.
|
static WayPoint |
of(Latitude latitude,
Longitude longitude,
Length elevation,
ZonedDateTime time)
Create a new
WayPoint with the given parameters. |
static WayPoint |
of(Latitude latitude,
Longitude longitude,
ZonedDateTime time)
Create a new
WayPoint with the given parameters. |
WayPoint.Builder |
toBuilder()
Convert the immutable way-point object into a mutable
builder initialized with the current way-point values.
|
String |
toString() |
public Latitude getLatitude()
Point
getLatitude
in interface Point
public Longitude getLongitude()
Point
getLongitude
in interface Point
public Optional<Length> getElevation()
Point
getElevation
in interface Point
public Optional<ZonedDateTime> getTime()
Point
public Optional<Degrees> getMagneticVariation()
public Optional<Length> getGeoidHeight()
public Optional<String> getName()
public Optional<String> getComment()
public Optional<String> getDescription()
public Optional<String> getSource()
public List<Link> getLinks()
public Optional<String> getSymbol()
public Optional<String> getType()
public Optional<UInt> getSat()
public Optional<Double> getHdop()
public Optional<Double> getVdop()
public Optional<Double> getPdop()
public Optional<Duration> getAgeOfGPSData()
public Optional<DGPSStation> getDGPSID()
public WayPoint.Builder toBuilder()
this
way-pointpublic static WayPoint.Builder builder()
WayPoint
builder.WayPoint
builderpublic static WayPoint of(Latitude latitude, Longitude longitude)
WayPoint
with the given latitude
and
longitude
value.latitude
- the latitude of the pointlongitude
- the longitude of the pointWayPoint
NullPointerException
- if one of the given arguments is null
public static WayPoint of(double latitudeDegree, double longitudeDegree)
WayPoint
with the given latitude
and
longitude
value.latitudeDegree
- the latitude of the pointlongitudeDegree
- the longitude of the pointWayPoint
IllegalArgumentException
- if the given latitude or longitude is not
in the valid range.public static WayPoint of(Latitude latitude, Longitude longitude, ZonedDateTime time)
WayPoint
with the given parameters.latitude
- the latitude of the pointlongitude
- the longitude of the pointtime
- the timestamp of the way-pointWayPoint
NullPointerException
- if one of the given arguments is null
public static WayPoint of(double latitudeDegree, double longitudeDegree, long timeEpochMilli)
WayPoint
with the given parameters.latitudeDegree
- the latitude of the pointlongitudeDegree
- the longitude of the pointtimeEpochMilli
- the timestamp of the way-pointWayPoint
NullPointerException
- if one of the given arguments is null
public static WayPoint of(Latitude latitude, Longitude longitude, Length elevation, ZonedDateTime time)
WayPoint
with the given parameters.latitude
- the latitude of the pointlongitude
- the longitude of the pointelevation
- the elevation of the pointtime
- the timestamp of the way-pointWayPoint
NullPointerException
- if one of the given arguments is null
public static WayPoint of(double latitudeDegree, double longitudeDegree, double elevationMeter, long timeEpochMilli)
WayPoint
with the given parameters.latitudeDegree
- the latitude of the pointlongitudeDegree
- the longitude of the pointelevationMeter
- the elevation of the pointtimeEpochMilli
- the timestamp of the way-pointWayPoint
NullPointerException
- if one of the given arguments is null
public static WayPoint of(Latitude latitude, Longitude longitude, Length elevation, Speed speed, ZonedDateTime time, Degrees magneticVariation, Length geoidHeight, String name, String comment, String description, String source, List<Link> links, String symbol, String type, Fix fix, UInt sat, Double hdop, Double vdop, Double pdop, Duration ageOfGPSData, DGPSStation dgpsID)
latitude
- the latitude of the point, WGS84 datum (mandatory)longitude
- the longitude of the point, WGS84 datum (mandatory)elevation
- the elevation (in meters) of the point (optional)speed
- the current GPS speed (optional)time
- creation/modification timestamp for element. Conforms to ISO
8601 specification for date/time representation. Fractional seconds
are allowed for millisecond timing in tracklogs. (optional)magneticVariation
- the magnetic variation at the point (optional)geoidHeight
- height (in meters) of geoid (mean sea level) above
WGS84 earth ellipsoid. As defined in NMEA GGA message. (optional)name
- the GPS name of the way-point. This field will be transferred
to and from the GPS. GPX does not place restrictions on the length
of this field or the characters contained in it. It is up to the
receiving application to validate the field before sending it to
the GPS. (optional)comment
- GPS way-point comment. Sent to GPS as comment (optional)description
- a text description of the element. Holds additional
information about the element intended for the user, not the GPS.
(optional)source
- source of data. Included to give user some idea of
reliability and accuracy of data. "Garmin eTrex", "USGS quad
Boston North", e.g. (optional)links
- links to additional information about the way-point. May be
empty, but not null
.symbol
- text of GPS symbol name. For interchange with other
programs, use the exact spelling of the symbol as displayed on the
GPS. If the GPS abbreviates words, spell them out. (optional)type
- type (classification) of the way-point (optional)fix
- type of GPX fix (optional)sat
- number of satellites used to calculate the GPX fix (optional)hdop
- horizontal dilution of precision (optional)vdop
- vertical dilution of precision (optional)pdop
- position dilution of precision. (optional)ageOfGPSData
- number of seconds since last DGPS update (optional)dgpsID
- ID of DGPS station used in differential correction (optional)WayPoint
NullPointerException
- if the latitude
or longitude
is null
© 2017-2017 Franz Wilhelmstötter (2017-11-04 19:06)