java.lang.Object
io.jenetics.jpx.WayPoint
- All Implemented Interfaces:
Point,Serializable
A
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();- Since:
- 1.0
- Version:
- 3.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for creating a way-point with different parameters. -
Method Summary
Modifier and TypeMethodDescriptionstatic WayPoint.Builderbuilder()Return a newWayPointbuilder.booleanReturn the number of seconds since last DGPS update.The GPS way-point comment.Return the instantaneous course at the point.Return a text description of the element.Return the ID of DGPS station used in differential correction.The elevation (in meters) of the point.Return the (cloned) extensions document.getFix()Return the type of GPX fix.The height (in meters) of geoid (mean sea level) above WGS84 earth ellipsoid.getHdop()Return the horizontal dilution of precision.The latitude of the point, WGS84 datum.getLinks()Return the links to additional information about the way-point.The longitude of the point, WGS84 datum.The magnetic variation at the point.getName()The GPS name of the way-point.getPdop()Return the position dilution of precision.getSat()Return the number of satellites used to calculate the GPX fix.Return the source of data.getSpeed()The current GPS speed.Return the text of GPS symbol name.getTime()Creation/modification timestamp for the point.getType()Return the type (classification) of the way-point.getVdop()Return the vertical dilution of precision.inthashCode()static WayPointof(double latitudeDegree, double longitudeDegree) Create a newWayPointwith the givenlatitudeandlongitudevalue.static WayPointof(double latitudeDegree, double longitudeDegree, double elevationMeter, long timeEpochMilli) Create a newWayPointwith the given parameters.static WayPointof(double latitudeDegree, double longitudeDegree, long timeEpochMilli) Create a newWayPointwith the given parameters.static WayPointCreate a newWayPointwith the givenlatitudeandlongitudevalue.static WayPointof(Latitude latitude, Longitude longitude, Length elevation, Speed speed, Instant 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, Degrees course) Create a new way-point with the given parameter.static WayPointof(Latitude latitude, Longitude longitude, Length elevation, Speed speed, Instant 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, Degrees course, Document extensions) Create a new way-point with the given parameter.static WayPointCreate a newWayPointwith the given parameters.static WayPointCreate a newWayPointwith the given parameters.static WayPointReturn a (new) WayPoint from the given inputpoint.Convert the immutable way-point object into a mutable builder initialized with the current way-point values.toString()
-
Method Details
-
getLatitude
Description copied from interface:PointThe latitude of the point, WGS84 datum.- Specified by:
getLatitudein interfacePoint- Returns:
- the latitude of the point
-
getLongitude
Description copied from interface:PointThe longitude of the point, WGS84 datum.- Specified by:
getLongitudein interfacePoint- Returns:
- the longitude of the point
-
getElevation
Description copied from interface:PointThe elevation (in meters) of the point.- Specified by:
getElevationin interfacePoint- Returns:
- the elevation (in meters) of the point
-
getSpeed
The current GPS speed.- Returns:
- the current GPS speed
-
getTime
Description copied from interface:PointCreation/modification timestamp for the point. -
getMagneticVariation
The magnetic variation at the point.- Returns:
- the magnetic variation at the point
-
getGeoidHeight
The height (in meters) of geoid (mean sea level) above WGS84 earth ellipsoid. As defined in NMEA GGA message.- Returns:
- the height (in meters) of geoid (mean sea level) above WGS84 earth ellipsoid
-
getName
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.- Returns:
- the GPS name of the way-point
-
getComment
The GPS way-point comment.- Returns:
- the GPS way-point comment
-
getDescription
Return a text description of the element. Holds additional information about the element intended for the user, not the GPS.- Returns:
- a text description of the element
-
getSource
Return the source of data. Included to give user some idea of reliability and accuracy of data. "Garmin eTrex", "USGS quad Boston North", e.g.- Returns:
- the source of the data
-
getLinks
Return the links to additional information about the way-point.- Returns:
- the links to additional information about the way-point
-
getSymbol
Return the 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.- Returns:
- the text of GPS symbol name
-
getType
Return the type (classification) of the way-point.- Returns:
- the type (classification) of the way-point
-
getFix
Return the type of GPX fix.- Returns:
- the type of GPX fix
-
getSat
Return the number of satellites used to calculate the GPX fix.- Returns:
- the number of satellites used to calculate the GPX fix
-
getHdop
Return the horizontal dilution of precision.- Returns:
- the horizontal dilution of precision
-
getVdop
Return the vertical dilution of precision.- Returns:
- the vertical dilution of precision
-
getPdop
Return the position dilution of precision.- Returns:
- the position dilution of precision
-
getAgeOfGPSData
Return the number of seconds since last DGPS update.- Returns:
- number of seconds since last DGPS update
-
getDGPSID
Return the ID of DGPS station used in differential correction.- Returns:
- the ID of DGPS station used in differential correction
-
getCourse
Return the instantaneous course at the point. This property is only available when you read GPX files version 1.0. In version 1.1 this field is alwaysOptional.empty().- Returns:
- the instantaneous course at the point
- Since:
- 1.3
-
getExtensions
Return the (cloned) extensions document. The root element of the returned document has the nameextensions.<extensions> ... </extensions>- Returns:
- the extensions document
- Throws:
DOMException- if the document could not be cloned, because of an erroneous XML configuration- Since:
- 1.5
-
toBuilder
Convert the immutable way-point object into a mutable builder initialized with the current way-point values.- Returns:
- a new way-point builder initialized with the values of
thisway-point - Since:
- 1.1
-
hashCode
-
equals
-
toString
-
builder
Return a newWayPointbuilder.- Returns:
- a new
WayPointbuilder
-
of
public static WayPoint of(Latitude latitude, Longitude longitude, Length elevation, Speed speed, Instant 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, Degrees course, Document extensions) Create a new way-point with the given parameter.- Parameters:
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 notnull.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)course- the Instantaneous course at the pointextensions- the extensions document- Returns:
- a new
WayPoint - Throws:
NullPointerException- if thelatitudeorlongitudeisnull- Since:
- 1.5
-
of
Create a newWayPointwith the givenlatitudeandlongitudevalue.- Parameters:
latitude- the latitude of the pointlongitude- the longitude of the point- Returns:
- a new
WayPoint - Throws:
NullPointerException- if one of the given arguments isnull
-
of
Create a newWayPointwith the givenlatitudeandlongitudevalue.- Parameters:
latitudeDegree- the latitude of the pointlongitudeDegree- the longitude of the point- Returns:
- a new
WayPoint - Throws:
IllegalArgumentException- if the given latitude or longitude is not in the valid range.
-
of
Create a newWayPointwith the given parameters.- Parameters:
latitude- the latitude of the pointlongitude- the longitude of the pointtime- the timestamp of the way-point- Returns:
- a new
WayPoint - Throws:
NullPointerException- if one of the given arguments isnull
-
of
Create a newWayPointwith the given parameters.- Parameters:
latitudeDegree- the latitude of the pointlongitudeDegree- the longitude of the pointtimeEpochMilli- the timestamp of the way-point- Returns:
- a new
WayPoint - Throws:
IllegalArgumentException- if one of the given arguments is invalid
-
of
Create a newWayPointwith the given parameters.- Parameters:
latitude- the latitude of the pointlongitude- the longitude of the pointelevation- the elevation of the pointtime- the timestamp of the way-point- Returns:
- a new
WayPoint - Throws:
NullPointerException- if one of the given arguments isnull
-
of
public static WayPoint of(double latitudeDegree, double longitudeDegree, double elevationMeter, long timeEpochMilli) Create a newWayPointwith the given parameters.- Parameters:
latitudeDegree- the latitude of the pointlongitudeDegree- the longitude of the pointelevationMeter- the elevation of the pointtimeEpochMilli- the timestamp of the way-point- Returns:
- a new
WayPoint - Throws:
IllegalArgumentException- if one of the given arguments is invalid
-
of
public static WayPoint of(Latitude latitude, Longitude longitude, Length elevation, Speed speed, Instant 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, Degrees course) Create a new way-point with the given parameter.- Parameters:
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 notnull.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)course- the Instantaneous course at the point- Returns:
- a new
WayPoint - Throws:
NullPointerException- if thelatitudeorlongitudeisnull- Since:
- 1.3
-
of
Return a (new) WayPoint from the given inputpoint. If the givenpointis already aWayPointinstance, the input is casted to aWayPointand returned.- Parameters:
point- the inputpointto create theWayPointfrom- Returns:
- a newly created
WayPointinstance, or the inputpointif it is already aWayPointinstance - Throws:
NullPointerException- if the givenpointisnull- Since:
- 1.4
-