public final class ProjectionEllipsoidUtils extends Object
This class provides utility methods needed for projections.
EllipsoidBodyShape
Modifier and Type | Field and Description |
---|---|
static double |
GEODETIC_PRECISION
Local precision for geodetic problem computation (in meters).
|
Modifier and Type | Method and Description |
---|---|
static double |
computeBearing(GeodeticPoint gv1,
GeodeticPoint gv2,
EllipsoidBodyShape shape)
Compute the bearing (azimuth) between two geodetic Points.
|
static GeodeticPoint |
computeCenterPointAlongLoxodrome(GeodeticPoint p1,
GeodeticPoint p2,
EllipsoidBodyShape body)
Compute center point between two points along a loxodrome.
|
static double |
computeInverseMeridionalDistance(double distance,
EllipsoidBodyShape shape)
Compute the geodetic latitude, from a distance from the equator.
|
static double |
computeInverseRectifyingLatitude(double rectifyingLat,
EllipsoidBodyShape shape)
compute geodetic latitude at a given rectifying latitude. rectifying latitude -> giving
sphere that has correct distances along the meridians
|
static double |
computeLoxodromicDistance(GeodeticPoint p1,
GeodeticPoint p2,
EllipsoidBodyShape shape)
Loxodromic distance between P1 and P2.This is the distance of constant bearing (or along a
line in Mercator).
|
static double |
computeMercatorLatitude(double geodeticLat,
EllipsoidBodyShape shape)
Compute crescent latitude (Le) at a given geodetic latitude. also called Mercator latitude.
|
static double |
computeMeridionalDistance(double geodeticLat,
EllipsoidBodyShape shape)
Compute the distance from a given geodetic latitude to the equator, along a meridian.
|
static double |
computeOrthodromicDistance(double lat1,
double lon1,
double lat2,
double lon2,
EllipsoidBodyShape shape)
Compute the orthodromic distance.
|
static double |
computeOrthodromicDistance(GeodeticPoint p1,
GeodeticPoint p2,
EllipsoidBodyShape shape)
Compute the orthodromic distance between two points.
|
static GeodeticPoint |
computePointAlongLoxodrome(GeodeticPoint p1,
double distance,
double azimuth,
EllipsoidBodyShape shape)
Compute the point coordinates from an origin point, an azimuth and a distance along the rhumb
line (Loxodrome).
|
static GeodeticPoint |
computePointAlongOrthodrome(GeodeticPoint p1,
double distance,
double azimuthDirection,
EllipsoidBodyShape shape)
Compute a geodetic point along orthodrome, from a point
p1 , at a
distance d , in a direction defined from an azimuth. |
static double |
computeRadiusEastWest(double geodeticLat,
EllipsoidBodyShape shape)
Compute radius of curvature section East/West (also called M or Re).
|
static double |
computeSphericalAzimuth(GeodeticPoint p1,
GeodeticPoint p2)
Compute the spherical azimuth (clock wise) between two points.
|
static List<GeodeticPoint> |
discretizeGreatCircle(GeodeticPoint from,
GeodeticPoint to,
double maxLength,
EllipsoidBodyShape shape)
Discretize a great circle into N segments, between two points.
|
static List<GeodeticPoint> |
discretizeRhumbLine(GeodeticPoint from,
GeodeticPoint to,
double maxLength,
EllipsoidBodyShape shape)
Discretize a rhumb line into N segments, between two points.
|
static double |
getEccentricity(EllipsoidBodyShape shape)
Get the eccentricity.
|
static double[] |
getSeries(EllipsoidBodyShape shape)
Getter for series.
|
public static final double GEODETIC_PRECISION
public static final double computeBearing(GeodeticPoint gv1, GeodeticPoint gv2, EllipsoidBodyShape shape) throws PatriusException
gv1
- geodetic point 1gv2
- geodetic point 2shape
- Body shape.PatriusException
- if points are too close from each otherpublic static double computeSphericalAzimuth(GeodeticPoint p1, GeodeticPoint p2)
p1
- first pointp2
- second pointpublic static double computeMercatorLatitude(double geodeticLat, EllipsoidBodyShape shape)
geodeticLat
- geodetic latitudeshape
- Body shape.public static double computeRadiusEastWest(double geodeticLat, EllipsoidBodyShape shape)
geodeticLat
- geodetic latitude must between : - PI/2 and PI/2shape
- Body shape.public static double computeLoxodromicDistance(GeodeticPoint p1, GeodeticPoint p2, EllipsoidBodyShape shape) throws PatriusException
p1
- Point 1p2
- Point 2shape
- Body shape.PatriusException
- if latitude of one point is not between -/+ 89.999 degpublic static final double computeMeridionalDistance(double geodeticLat, EllipsoidBodyShape shape)
geodeticLat
- geodetic latitude must between : - PI/2 and PI/2shape
- Body shape.public static final double computeInverseMeridionalDistance(double distance, EllipsoidBodyShape shape)
distance
- distance from the equatorshape
- Body shape.public static final GeodeticPoint computePointAlongLoxodrome(GeodeticPoint p1, double distance, double azimuth, EllipsoidBodyShape shape) throws PatriusException
p1
- initial pointdistance
- distance along the rhumb lineazimuth
- Convention used : azimuth is angle from the north direction to the current
direction in CLOCKWISE sense.shape
- Body shape.PatriusException
- if computed latitudes are out of rangepublic static double computeInverseRectifyingLatitude(double rectifyingLat, EllipsoidBodyShape shape)
rectifyingLat
- rectifying latitudeshape
- Body shape.public static final double computeOrthodromicDistance(GeodeticPoint p1, GeodeticPoint p2, EllipsoidBodyShape shape)
p1
- first pointp2
- second pointshape
- Body shape.public static final double computeOrthodromicDistance(double lat1, double lon1, double lat2, double lon2, EllipsoidBodyShape shape)
lat1
- latitude point 1.lon1
- longitude point 1.lat2
- latitude point 2.lon2
- longitude point 2.shape
- Body shape.public static final GeodeticPoint computePointAlongOrthodrome(GeodeticPoint p1, double distance, double azimuthDirection, EllipsoidBodyShape shape)
p1
, at a
distance d
, in a direction defined from an azimuth. This is the direct geodetic
problem. This code is issue from Vincenty's works.p1
- Origin point.distance
- Distance to compute resulting point.azimuthDirection
- azimuth direction, convention used : azimuth is angle from the north
direction to the current direction in CLOCKWISE sense.shape
- Body shape.public static final List<GeodeticPoint> discretizeRhumbLine(GeodeticPoint from, GeodeticPoint to, double maxLength, EllipsoidBodyShape shape) throws PatriusException
from
- first geodetic pointto
- ending geodetic pointmaxLength
- This distance is used when a discretization occurs : i.e : when the line
property is not coherent with the projection ( EnumLineProperty
). This
parameter represent a distance expressed in meters. This will be the maximal
distance between two points of the projected polygon. If you set the parameter to a
value <=0 no discretization will be done.shape
- Body shape.PatriusException
- if points are too close from each otherpublic static final List<GeodeticPoint> discretizeGreatCircle(GeodeticPoint from, GeodeticPoint to, double maxLength, EllipsoidBodyShape shape)
from
- first geodetic pointto
- ending geodetic pointmaxLength
- This distance is used when a discretization occurs : i.e : when the line
property is not coherent with the projection ( EnumLineProperty
). This
parameter represent a distance expressed in meters. This will be the maximal
distance between two points of the projected polygon. If you set the parameter to a
value <=0, no discretization will be done.shape
- Body shape.public static double getEccentricity(EllipsoidBodyShape shape)
shape
- Body shape.public static double[] getSeries(EllipsoidBodyShape shape)
shape
- Body shape.public static GeodeticPoint computeCenterPointAlongLoxodrome(GeodeticPoint p1, GeodeticPoint p2, EllipsoidBodyShape body) throws PatriusException
p1
- first pointp2
- second pointbody
- Earth bodyPatriusException
- thrown if computation failedCopyright © 2020 CNES. All rights reserved.