Package com.luciad.geodesy
Class GeoLocation.Builder
java.lang.Object
com.luciad.geodesy.GeoLocation.Builder
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
GeoLocation
Builder class for
GeoLocation.- Since:
- 2026.1
-
Method Summary
Modifier and TypeMethodDescriptionThe azimuth of the local Y-axis after transformation.build()Creates the newGeoLocation.voidclose()protected voidfinalize()localOrigin(Coordinate localOrigin) The point in the local reference that, once transformed, will correspond to the target location.targetLocation(Point targetLocation) The target location that the local origin will map to after transformation.targetReference(CoordinateReference targetReference) The target reference which points will be transformed to.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
localOrigin
The point in the local reference that, once transformed, will correspond to the target location.By default, this is (0, 0, 0).
- Parameters:
localOrigin- the local origin.- Returns:
- this builder.
-
targetLocation
@NotNull public GeoLocation.Builder targetLocation(@NotNull Point targetLocation) throws NullPointerException, IllegalArgumentException The target location that the local origin will map to after transformation.Calling this method is mandatory.
Note: for convenience, this
Pointdoes not necessarily need to have the same reference as thetarget reference. For example, it is possible that theGeoLocation's target reference is geocentric, but the target location is expressed in longitude/latitude/height.- Parameters:
targetLocation- the target location.- Returns:
- this builder.
- Throws:
NullPointerException- if the target location isnull.IllegalArgumentException- if the target location's reference is Cartesian.
-
targetReference
@NotNull public GeoLocation.Builder targetReference(@NotNull CoordinateReference targetReference) throws NullPointerException, IllegalArgumentException The target reference which points will be transformed to.By default, this is a geocentric reference (EPSG:4978).
Note: for convenience, this reference does not necessarily have to be the same as the
target location's reference. For example, it is possible that theGeoLocation's target reference is geocentric, and the target location is expressed in longitude/latitude/height.- Parameters:
targetReference- the target reference.- Returns:
- this builder.
- Throws:
NullPointerException- if the target reference isnull.IllegalArgumentException- if the target reference is Cartesian.
-
azimuth
The azimuth of the local Y-axis after transformation.By default, this is 0 (facing north).
- Parameters:
azimuth- the azimuth.- Returns:
- this builder.
-
build
Creates the newGeoLocation.- Returns:
- the new
GeoLocation. - Throws:
IllegalStateException- iftargetLocationwas not called.IllegalArgumentException- if thetarget locationis not a valid point in the target reference.
-