Package com.gaia3d.util
Class GlobeUtils
java.lang.Object
com.gaia3d.util.GlobeUtils
Utility class for converting between geographic and cartesian coordinates.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final org.locationtech.proj4j.CoordinateReferenceSystem -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleangRadLatitudeForDistance(double latRad, double distance) static doubleangRadLatitudeForDistance(double latRad, double distance, CelestialBody body) static doubleangRadLongitudeForDistance(double latRad, double distance) static doubleangRadLongitudeForDistance(double latRad, double distance, CelestialBody body) static org.joml.Vector3dcartesianToGeographic(double x, double y, double z, CelestialBody body) static org.joml.Vector3dcartesianToGeographic(org.joml.Vector3d cartographic, CelestialBody body) static org.joml.Vector3dcartesianToGeographicWgs84(double x, double y, double z) static org.joml.Vector3dcartesianToGeographicWgs84(org.joml.Vector3d cartographic) static org.locationtech.proj4j.CoordinateReferenceSystemconvertProj4jCrsFromGeotoolsCrs(org.geotools.api.referencing.crs.CoordinateReferenceSystem crs) static org.geotools.api.referencing.crs.CoordinateReferenceSystemconvertWkt(String wkt) static double[]distanceBetweenDegrees(double[] minDegrees, double[] maxDegrees) static double[]distanceBetweenDegrees(double[] minDegrees, double[] maxDegrees, CelestialBody body) static doubledistanceBetweenLatitudesRad(double minLatRad, double maxLatRad) static doubledistanceBetweenLatitudesRad(double minLatRad, double maxLatRad, CelestialBody body) static doubledistanceBetweenLongitudesRad(double latRad, double minLonRad, double maxLonRad) static doubledistanceBetweenLongitudesRad(double latRad, double minLonRad, double maxLonRad, CelestialBody body) static StringextractEpsgCodeFromWTK(String wktCRS) static double[]geographicToCartesian(double longitude, double latitude, double altitude, CelestialBody body) static org.joml.Vector3dgeographicToCartesian(org.joml.Vector3d position, CelestialBody body) static double[]geographicToCartesianWgs84(double longitude, double latitude, double altitude) static org.joml.Vector3dgeographicToCartesianWgs84(org.joml.Vector3d position) static doublegetRadiusAtLatitude(double latitude) static doublegetRadiusAtLatitude(double latitude, CelestialBody body) static org.joml.Vector3dnormalAtCartesianPoint(double x, double y, double z, CelestialBody body) static org.joml.Vector3dnormalAtCartesianPoint(org.joml.Vector3d cartesian, CelestialBody body) static org.joml.Vector3dnormalAtCartesianPointWgs84(double x, double y, double z) static org.joml.Vector3dnormalAtCartesianPointWgs84(org.joml.Vector3d cartesian) static doubleradiusAtLatitudeRad(double latRad) static doubleradiusAtLatitudeRad(double latRad, CelestialBody body) static org.joml.Vector3dtransform(org.locationtech.proj4j.CoordinateReferenceSystem source, org.joml.Vector3d coordinate) static org.joml.Vector3dtransform(org.locationtech.proj4j.CoordinateReferenceSystem source, org.locationtech.proj4j.CoordinateReferenceSystem target, org.joml.Vector3d coordinate) static org.locationtech.proj4j.ProjCoordinatetransform(org.locationtech.proj4j.CoordinateReferenceSystem source, org.locationtech.proj4j.CoordinateReferenceSystem target, org.locationtech.proj4j.ProjCoordinate coordinate) static org.locationtech.proj4j.ProjCoordinatetransform(org.locationtech.proj4j.CoordinateReferenceSystem source, org.locationtech.proj4j.ProjCoordinate coordinate) static org.joml.Matrix4dtransformMatrixAtCartesianPoint(double x, double y, double z, CelestialBody body) static org.joml.Matrix4dtransformMatrixAtCartesianPoint(org.joml.Vector3d position, CelestialBody body) static org.joml.Matrix4dtransformMatrixAtCartesianPointWgs84(double x, double y, double z) static org.joml.Matrix4dtransformMatrixAtCartesianPointWgs84(org.joml.Vector3d position) static org.locationtech.jts.geom.CoordinatetransformOnGeotools(org.geotools.api.referencing.crs.CoordinateReferenceSystem source, org.locationtech.jts.geom.Coordinate coordinate)
-
Field Details
-
DEGREE_TO_RADIAN_FACTOR
public static final double DEGREE_TO_RADIAN_FACTOR- See Also:
-
EQUATORIAL_RADIUS
public static final double EQUATORIAL_RADIUS- See Also:
-
EQUATORIAL_RADIUS_SQUARED
public static final double EQUATORIAL_RADIUS_SQUARED- See Also:
-
POLAR_RADIUS
public static final double POLAR_RADIUS- See Also:
-
POLAR_RADIUS_SQUARED
public static final double POLAR_RADIUS_SQUARED- See Also:
-
FIRST_ECCENTRICITY_SQUARED
public static final double FIRST_ECCENTRICITY_SQUARED- See Also:
-
wgs84
public static final org.locationtech.proj4j.CoordinateReferenceSystem wgs84
-
-
Constructor Details
-
GlobeUtils
public GlobeUtils()
-
-
Method Details
-
geographicToCartesian
public static double[] geographicToCartesian(double longitude, double latitude, double altitude, CelestialBody body) -
geographicToCartesian
public static org.joml.Vector3d geographicToCartesian(org.joml.Vector3d position, CelestialBody body) -
radiusAtLatitudeRad
-
distanceBetweenLatitudesRad
public static double distanceBetweenLatitudesRad(double minLatRad, double maxLatRad, CelestialBody body) -
distanceBetweenDegrees
public static double[] distanceBetweenDegrees(double[] minDegrees, double[] maxDegrees, CelestialBody body) -
distanceBetweenLongitudesRad
public static double distanceBetweenLongitudesRad(double latRad, double minLonRad, double maxLonRad, CelestialBody body) -
angRadLatitudeForDistance
-
angRadLongitudeForDistance
-
normalAtCartesianPoint
public static org.joml.Vector3d normalAtCartesianPoint(double x, double y, double z, CelestialBody body) -
normalAtCartesianPoint
public static org.joml.Vector3d normalAtCartesianPoint(org.joml.Vector3d cartesian, CelestialBody body) -
transformMatrixAtCartesianPoint
public static org.joml.Matrix4d transformMatrixAtCartesianPoint(double x, double y, double z, CelestialBody body) -
transformMatrixAtCartesianPoint
public static org.joml.Matrix4d transformMatrixAtCartesianPoint(org.joml.Vector3d position, CelestialBody body) -
cartesianToGeographic
public static org.joml.Vector3d cartesianToGeographic(double x, double y, double z, CelestialBody body) -
cartesianToGeographic
public static org.joml.Vector3d cartesianToGeographic(org.joml.Vector3d cartographic, CelestialBody body) -
getRadiusAtLatitude
-
geographicToCartesianWgs84
public static double[] geographicToCartesianWgs84(double longitude, double latitude, double altitude) -
geographicToCartesianWgs84
public static org.joml.Vector3d geographicToCartesianWgs84(org.joml.Vector3d position) -
radiusAtLatitudeRad
public static double radiusAtLatitudeRad(double latRad) -
distanceBetweenLatitudesRad
public static double distanceBetweenLatitudesRad(double minLatRad, double maxLatRad) -
distanceBetweenDegrees
public static double[] distanceBetweenDegrees(double[] minDegrees, double[] maxDegrees) -
distanceBetweenLongitudesRad
public static double distanceBetweenLongitudesRad(double latRad, double minLonRad, double maxLonRad) -
angRadLatitudeForDistance
public static double angRadLatitudeForDistance(double latRad, double distance) -
angRadLongitudeForDistance
public static double angRadLongitudeForDistance(double latRad, double distance) -
transformMatrixAtCartesianPointWgs84
public static org.joml.Matrix4d transformMatrixAtCartesianPointWgs84(double x, double y, double z) -
transformMatrixAtCartesianPointWgs84
public static org.joml.Matrix4d transformMatrixAtCartesianPointWgs84(org.joml.Vector3d position) -
normalAtCartesianPointWgs84
public static org.joml.Vector3d normalAtCartesianPointWgs84(org.joml.Vector3d cartesian) -
normalAtCartesianPointWgs84
public static org.joml.Vector3d normalAtCartesianPointWgs84(double x, double y, double z) -
cartesianToGeographicWgs84
public static org.joml.Vector3d cartesianToGeographicWgs84(double x, double y, double z) -
cartesianToGeographicWgs84
public static org.joml.Vector3d cartesianToGeographicWgs84(org.joml.Vector3d cartographic) -
getRadiusAtLatitude
public static double getRadiusAtLatitude(double latitude) -
transform
public static org.locationtech.proj4j.ProjCoordinate transform(org.locationtech.proj4j.CoordinateReferenceSystem source, org.locationtech.proj4j.ProjCoordinate coordinate) -
transform
public static org.locationtech.proj4j.ProjCoordinate transform(org.locationtech.proj4j.CoordinateReferenceSystem source, org.locationtech.proj4j.CoordinateReferenceSystem target, org.locationtech.proj4j.ProjCoordinate coordinate) -
transform
public static org.joml.Vector3d transform(org.locationtech.proj4j.CoordinateReferenceSystem source, org.joml.Vector3d coordinate) -
transform
public static org.joml.Vector3d transform(org.locationtech.proj4j.CoordinateReferenceSystem source, org.locationtech.proj4j.CoordinateReferenceSystem target, org.joml.Vector3d coordinate) -
transformOnGeotools
public static org.locationtech.jts.geom.Coordinate transformOnGeotools(org.geotools.api.referencing.crs.CoordinateReferenceSystem source, org.locationtech.jts.geom.Coordinate coordinate) -
convertWkt
-
extractEpsgCodeFromWTK
-
convertProj4jCrsFromGeotoolsCrs
public static org.locationtech.proj4j.CoordinateReferenceSystem convertProj4jCrsFromGeotoolsCrs(org.geotools.api.referencing.crs.CoordinateReferenceSystem crs)
-