| java.lang.Object org.geotools.resources.CRSUtilities
CRSUtilities | final public class CRSUtilities (Code) | | A set of static methods working on OpenGIS®
objects.
Some of those methods are useful, but not really rigorous. This is why they
do not appear in the "official" package, but instead in this private one.
Do not rely on this API! It may change in incompatible way
in any future release.
since: 2.0 version: $Id: CRSUtilities.java 25787 2007-06-10 16:04:55Z desruisseaux $ author: Martin Desruisseaux |
Method Summary | |
public static DirectPosition | deltaTransform(MathTransform transform, DirectPosition origin, DirectPosition source) Transforms the relative distance vector specified by
source and stores
the result in
dest . | public static Point2D | deltaTransform(MathTransform2D transform, Point2D origin, Point2D source, Point2D dest) Transforms the relative distance vector specified by
source and stores
the result in
dest . | public static int | dimensionColinearWith(CoordinateSystem cs, CoordinateSystemAxis axis) Returns the dimension within the coordinate system of the first occurrence of an axis
colinear with the specified axis. | public static boolean | equalsIgnoreMetadata(Object object1, Object object2) | public static CoordinateReferenceSystem | getCRS2D(CoordinateReferenceSystem crs) Returns a two-dimensional coordinate reference system representing the two first dimensions
of the specified coordinate reference system. | public static Datum | getDatum(CoordinateReferenceSystem crs) Returns the datum of the specified CRS, or
null if none. | public static int | getDimensionOf(CoordinateReferenceSystem crs, Class type) Returns the dimension of the first coordinate reference system of the given type. | public static Ellipsoid | getEllipsoid(CoordinateReferenceSystem crs) | public static Ellipsoid | getHeadGeoEllipsoid(CoordinateReferenceSystem crs) Returns the ellipsoid used by the specified coordinate reference system, providing that
the two first dimensions use an instance of
GeographicCRS . | public static SingleCRS | getHorizontalCRS(CoordinateReferenceSystem crs) | public static ProjectedCRS | getProjectedCRS(CoordinateReferenceSystem crs) | public static CoordinateReferenceSystem | getSubCRS(CoordinateReferenceSystem crs, int lower, int upper) Returns a sub-coordinate reference system for the specified dimension range.
Parameters: crs - The coordinate reference system to decompose. Parameters: lower - The first dimension to keep, inclusive. Parameters: upper - The last dimension to keep, exclusive. | public static TemporalCRS | getTemporalCRS(CoordinateReferenceSystem crs) | public static Unit | getUnit(CoordinateSystem cs) Returns the unit used for all axis in the specified coordinate system. | public static VerticalCRS | getVerticalCRS(CoordinateReferenceSystem crs) | public static String | toWGS84String(CoordinateReferenceSystem crs, Rectangle2D bounds) Returns a character string for the specified geographic area. | public static GeneralEnvelope | transform(MathTransform transform, Envelope envelope) | public static Rectangle2D | transform(MathTransform2D transform, Rectangle2D source, Rectangle2D dest) |
deltaTransform | public static DirectPosition deltaTransform(MathTransform transform, DirectPosition origin, DirectPosition source) throws TransformException(Code) | | Transforms the relative distance vector specified by
source and stores
the result in
dest . A relative distance vector is transformed without
applying the translation components.
Parameters: transform - The transform to apply. Parameters: origin - The position where to compute the delta transform in the source CS. Parameters: source - The distance vector to be delta transformed The result of the transformation. throws: TransformException - if the transformation failed. since: 2.3 |
deltaTransform | public static Point2D deltaTransform(MathTransform2D transform, Point2D origin, Point2D source, Point2D dest) throws TransformException(Code) | | Transforms the relative distance vector specified by
source and stores
the result in
dest . A relative distance vector is transformed without
applying the translation components.
Parameters: transform - The transform to apply. Parameters: origin - The position where to compute the delta transform in the source CS. Parameters: source - The distance vector to be delta transformed Parameters: dest - The resulting transformed distance vector, or null The result of the transformation. throws: TransformException - if the transformation failed. See Also: AffineTransform.deltaTransform(Point2DPoint2D) |
dimensionColinearWith | public static int dimensionColinearWith(CoordinateSystem cs, CoordinateSystemAxis axis)(Code) | | Returns the dimension within the coordinate system of the first occurrence of an axis
colinear with the specified axis. If an axis with the same
or an
direction than
axis ocurs in the coordinate system, then the dimension of the first such occurrence
is returned. That is, the a value k such that:
cs.getAxis(k).getDirection().absolute() == axis.getDirection().absolute()
is
true . If no such axis occurs in this coordinate system,
then
-1 is returned.
For example,
dimensionColinearWith(CoordinateSystemAxis.TIME) returns the dimension number of time axis.
Parameters: cs - The coordinate system to examine. Parameters: axis - The axis to look for. The dimension number of the specified axis, or -1 if none. |
getCRS2D | public static CoordinateReferenceSystem getCRS2D(CoordinateReferenceSystem crs) throws TransformException(Code) | | Returns a two-dimensional coordinate reference system representing the two first dimensions
of the specified coordinate reference system. If
crs is already a two-dimensional
CRS, then it is returned unchanged. Otherwise, if it is a
CompoundCRS , then the
head coordinate reference system is examined.
Parameters: crs - The coordinate system, or null . A two-dimensional coordinate reference system that represents the two firstdimensions of crs , or null if crs was null . throws: TransformException - if crs can't be reduced to a two-coordinate system.We use this exception class since this method is usually invoked in the contextof a transformation process. |
getDatum | public static Datum getDatum(CoordinateReferenceSystem crs)(Code) | | Returns the datum of the specified CRS, or
null if none.
|
getDimensionOf | public static int getDimensionOf(CoordinateReferenceSystem crs, Class type) throws IllegalArgumentException(Code) | | Returns the dimension of the first coordinate reference system of the given type. The
type argument must be a subinterface of
CoordinateReferenceSystem .
If no such dimension is found, then this method returns
-1 .
Parameters: crs - The coordinate reference system (CRS) to examine. Parameters: type - The CRS type to look for.Must be a subclass of CoordinateReferenceSystem. The dimension range of the specified CRS type, or -1 if none. throws: IllegalArgumentException - if the type is not legal. |
getEllipsoid | public static Ellipsoid getEllipsoid(CoordinateReferenceSystem crs)(Code) | | CRS |
getHeadGeoEllipsoid | public static Ellipsoid getHeadGeoEllipsoid(CoordinateReferenceSystem crs)(Code) | | Returns the ellipsoid used by the specified coordinate reference system, providing that
the two first dimensions use an instance of
GeographicCRS . Otherwise (i.e. if the
two first dimensions are not geographic), returns
null .
|
getHorizontalCRS | public static SingleCRS getHorizontalCRS(CoordinateReferenceSystem crs)(Code) | | CRS |
getProjectedCRS | public static ProjectedCRS getProjectedCRS(CoordinateReferenceSystem crs)(Code) | | CRS |
getSubCRS | public static CoordinateReferenceSystem getSubCRS(CoordinateReferenceSystem crs, int lower, int upper)(Code) | | Returns a sub-coordinate reference system for the specified dimension range.
Parameters: crs - The coordinate reference system to decompose. Parameters: lower - The first dimension to keep, inclusive. Parameters: upper - The last dimension to keep, exclusive. The sub-coordinate system, or null if crs can'tbe decomposed for dimensions in the range [lower..upper] . |
getTemporalCRS | public static TemporalCRS getTemporalCRS(CoordinateReferenceSystem crs)(Code) | | CRS |
getUnit | public static Unit getUnit(CoordinateSystem cs)(Code) | | Returns the unit used for all axis in the specified coordinate system.
If not all axis uses the same unit, then this method returns
null .
This convenience method is often used for Well Know Text (WKT) formatting.
since: 2.2 |
getVerticalCRS | public static VerticalCRS getVerticalCRS(CoordinateReferenceSystem crs)(Code) | | CRS |
toWGS84String | public static String toWGS84String(CoordinateReferenceSystem crs, Rectangle2D bounds)(Code) | | Returns a character string for the specified geographic area. The string will have the
form "45°00.00'N-50°00.00'N 30°00.00'E-40°00.00'E". If a map projection is required in
order to obtain this representation, it will be automatically applied. This string is
mostly used for debugging purpose.
org.geotools.referencing.CRS GeographicBoundingBox.toString() GeographicBoundingBox |
transform | public static GeneralEnvelope transform(MathTransform transform, Envelope envelope) throws TransformException(Code) | | CRS |
|
|