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 double
static final double
static final double
static final double
static final double
static final double
static final org.locationtech.proj4j.CoordinateReferenceSystem
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic double
angRadLatitudeForDistance
(double latRad, double distance) static double
angRadLongitudeForDistance
(double latRad, double distance) static org.joml.Vector3d
cartesianToGeographicWgs84
(double x, double y, double z) static org.joml.Vector3d
cartesianToGeographicWgs84
(org.joml.Vector3d position) static org.locationtech.proj4j.CoordinateReferenceSystem
convertProj4jCrsFromGeotoolsCrs
(org.opengis.referencing.crs.CoordinateReferenceSystem crs) static org.opengis.referencing.crs.CoordinateReferenceSystem
convertWkt
(String wkt) static double
distanceBetweenLatitudesRad
(double minLatRad, double maxLatRad) static double
distanceBetweenLongitudesRad
(double latRad, double minLonRad, double maxLonRad) static String
extractEpsgCodeFromWTK
(String wktCRS) static double[]
geographicToCartesianWgs84
(double longitude, double latitude, double altitude) static org.joml.Vector3d
geographicToCartesianWgs84
(org.joml.Vector3d position) static double
getRadiusAtLatitude
(double latitude) static org.joml.Vector3d
normalAtCartesianPointWgs84
(double x, double y, double z) static org.joml.Vector3d
normalAtCartesianPointWgs84
(org.joml.Vector3d cartesian) static double
radiusAtLatitudeRad
(double latRad) static org.locationtech.proj4j.ProjCoordinate
transform
(org.locationtech.proj4j.CoordinateReferenceSystem source, org.locationtech.proj4j.ProjCoordinate coordinate) static org.joml.Matrix4d
transformMatrixAtCartesianPointWgs84
(double x, double y, double z) static org.joml.Matrix4d
transformMatrixAtCartesianPointWgs84
(org.joml.Vector3d position) static org.locationtech.jts.geom.Coordinate
transformOnGeotools
(org.opengis.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
-
geographicToCartesianWgs84
public static double[] geographicToCartesianWgs84(double longitude, double latitude, double altitude) -
radiusAtLatitudeRad
public static double radiusAtLatitudeRad(double latRad) -
distanceBetweenLatitudesRad
public static double distanceBetweenLatitudesRad(double minLatRad, double maxLatRad) -
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) -
geographicToCartesianWgs84
public static org.joml.Vector3d geographicToCartesianWgs84(org.joml.Vector3d position) -
transformMatrixAtCartesianPointWgs84
public static org.joml.Matrix4d transformMatrixAtCartesianPointWgs84(double x, double y, double z) -
normalAtCartesianPointWgs84
public static org.joml.Vector3d normalAtCartesianPointWgs84(org.joml.Vector3d cartesian) -
normalAtCartesianPointWgs84
public static org.joml.Vector3d normalAtCartesianPointWgs84(double x, double y, double z) -
transformMatrixAtCartesianPointWgs84
public static org.joml.Matrix4d transformMatrixAtCartesianPointWgs84(org.joml.Vector3d position) -
cartesianToGeographicWgs84
public static org.joml.Vector3d cartesianToGeographicWgs84(double x, double y, double z) -
cartesianToGeographicWgs84
public static org.joml.Vector3d cartesianToGeographicWgs84(org.joml.Vector3d position) -
transform
public static org.locationtech.proj4j.ProjCoordinate transform(org.locationtech.proj4j.CoordinateReferenceSystem source, org.locationtech.proj4j.ProjCoordinate coordinate) -
transformOnGeotools
public static org.locationtech.jts.geom.Coordinate transformOnGeotools(org.opengis.referencing.crs.CoordinateReferenceSystem source, org.locationtech.jts.geom.Coordinate coordinate) -
getRadiusAtLatitude
public static double getRadiusAtLatitude(double latitude) -
convertWkt
-
extractEpsgCodeFromWTK
-
convertProj4jCrsFromGeotoolsCrs
public static org.locationtech.proj4j.CoordinateReferenceSystem convertProj4jCrsFromGeotoolsCrs(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
-