public class IlvProjectionUtil extends Object
Modifier and Type | Method and Description |
---|---|
static String |
DegreeToDMS(double degree,
boolean lat)
Converts a double representing degrees to a string.
|
static double |
DegreeToRadian(double degree)
Converts to radians the value of an angle given in degrees.
|
static double |
DMSToDegree(String value)
Converts a string specifying an angle in degrees, minutes,
and seconds to degrees.
|
static double |
DMSToRadian(String value)
Converts a string specifying an angle in degrees, minutes,
and seconds to radians.
|
static IlvCoordinateSystem |
GetCoordinateSystemFromProjection(IlvProjection p)
Returns an
IlvCoordinateSystem that corresponds to the
projection passed as argument. |
static IlvLinearUnit |
GetLinearUnit(IlvCoordinateSystem cs)
Returns the linear unit of the coordinate system passed as argument.
|
static IlvProjection |
GetProjectionFromCoordinateSystem(IlvCoordinateSystem cs)
Returns an
IlvProjection that corresponds to the
coordinate system passed as argument. |
static void |
invertY(IlvCoordinate xy)
Inverts the
y coordinate of a coordinate. |
static void |
invertY(IlvPoint xy)
Inverts the
y coordinate of a point. |
static double |
RadianToDegree(double radian)
Converts to degrees the value of an angle given in radians.
|
static String |
RadianToDMS(double radian,
boolean lat)
Converts a double representing radians to a string.
|
static String |
RadianToDMS(IlvCoordinate coord)
Converts a point represented by the
IlvCoordinate
parameter to degrees, minutes, and seconds represented by a string. |
static String |
RadianToDMS(IlvPoint coord)
Converts a point represented by the
IlvPoint
parameter to degrees,
minutes, and seconds represented by a string. |
static void |
ToViews(IlvCoordinate source,
IlvPoint result,
IlvProjection sourceProjection,
IlvProjection targetProjection)
Converts an
IlvCoordinate object expressed in a
Cartesian coordinate system into an IlvPoint object expressed
in a manager coordinate system. |
static void |
ToViews(IlvCoordinateTransformation transform,
IlvCoordinate coordinate,
IlvPoint holder)
Transforms an
IlvCoordinate object expressed in a
Cartesian coordinate system into an IlvPoint object expressed
in a manager coordinate system by using the coordinate transformation
passed as argument. |
public static double DegreeToRadian(double degree)
degree
- The value to be converted.public static double RadianToDegree(double radian)
radian
- The value to be converted.public static String DegreeToDMS(double degree, boolean lat)
degree
- The value to be converted.lat
- true
, if the angle is a latitude, and false
if the
angle is a longitude.public static String RadianToDMS(double radian, boolean lat)
radian
- The value to be converted.lat
- true
, if the angle is a latitude, and false
if the angle
is a longitude.public static String RadianToDMS(IlvCoordinate coord)
IlvCoordinate
parameter to degrees, minutes, and seconds represented by a string.
The function assumes that the data is expressed in radians.coord
- Contains the longitude in the x field and the latitude in the y
field. Both values should be in radians.public static String RadianToDMS(IlvPoint coord)
IlvPoint
parameter to degrees,
minutes, and seconds represented by a string. The function assumes
that the data is expressed in radians.coord
- Contains the longitude in the x field and the latitude
in the y field. Both values should be in radians.public static double DMSToDegree(String value) throws IlvBadProjectionParameter
value
- The string defining the angle in degrees.IlvBadProjectionParameter
- If a string format error occurs.public static double DMSToRadian(String value) throws IlvBadProjectionParameter
value
- The string defining the angle in degrees.0
if value
is
null
or the empty string.IlvBadProjectionParameter
- If a string format error occurs.public static void invertY(IlvPoint xy)
y
coordinate of a point.xy
- The point to convert.public static void invertY(IlvCoordinate xy)
y
coordinate of a coordinate.xy
- The point to convert.public static void ToViews(IlvCoordinate source, IlvPoint result, IlvProjection sourceProjection, IlvProjection targetProjection) throws IlvProjectionException
IlvCoordinate
object expressed in a
Cartesian coordinate system into an IlvPoint
object expressed
in a manager coordinate system.
If the source and target projection parameters are passed with
non-null, the method reprojects the point in the target
projection.source
- The coordinate to convert.result
- The result of the conversion.sourceProjection
- An optional parameter specifying the source projection.targetProjection
- An optional parameter specifying the target projection.If
- an error occurs while projecting data.IlvProjectionException
public static final IlvLinearUnit GetLinearUnit(IlvCoordinateSystem cs)
public static final void ToViews(IlvCoordinateTransformation transform, IlvCoordinate coordinate, IlvPoint holder) throws IlvCoordinateTransformationException
IlvCoordinate
object expressed in a
Cartesian coordinate system into an IlvPoint
object expressed
in a manager coordinate system by using the coordinate transformation
passed as argument.transform
- The coordinate transformation.coordinate
- The IlvCoordinate
to be transformed.holder
- The transformed IlvPoint
.If
- an error occurs while transforming data.IlvCoordinateTransformationException
public static final IlvProjection GetProjectionFromCoordinateSystem(IlvCoordinateSystem cs)
IlvProjection
that corresponds to the
coordinate system passed as argument.public static final IlvCoordinateSystem GetCoordinateSystemFromProjection(IlvProjection p)
IlvCoordinateSystem
that corresponds to the
projection passed as argument.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.