org.geotools.resources
Class CTSUtilities

java.lang.Object
  extended byorg.geotools.resources.CTSUtilities

Deprecated. Use CRSUtilities instead.

public final class CTSUtilities
extends java.lang.Object

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 version.

Version:
$Id: CTSUtilities.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Martin Desruisseaux

Method Summary
static java.awt.geom.Point2D deltaTransform(MathTransform2D transform, java.awt.geom.Point2D origin, java.awt.geom.Point2D source, java.awt.geom.Point2D dest)
          Deprecated. Transforms the relative distance vector specified by source and stores the result in dest.
static CoordinateSystem getCoordinateSystem2D(CoordinateSystem cs)
          Deprecated. Returns a two-dimensional coordinate system representing the two first dimensions of the specified coordinate system.
static int getDimensionOf(CoordinateSystem cs, AxisInfo axis)
          Deprecated. Returns the dimension of the first axis of a particular type.
static int getDimensionOf(CoordinateSystem cs, java.lang.Class type)
          Deprecated. Returns the dimension of the first coordinate system of the given type.
static Ellipsoid getEllipsoid(CoordinateSystem cs)
          Deprecated. Returns the first ellipsoid found in a coordinate system, or null if there is none.
static Ellipsoid getHeadGeoEllipsoid(CoordinateSystem coordinateSystem)
          Deprecated. Returns the ellipsoid used by the specified coordinate system, providing that the two first dimensions use an instance of GeographicCoordinateSystem.
static HorizontalCoordinateSystem getHorizontalCS(CoordinateSystem cs)
          Deprecated. Returns the first horizontal coordinate system found in a coordinate system, or null if there is none.
static Projection getProjection(CoordinateSystem cs)
          Deprecated. Returns the first projection found in a coordinate system, or null if there is none.
static CoordinateSystem getSubCoordinateSystem(CoordinateSystem cs, int lower, int upper)
          Deprecated. Returns a sub-coordinate system for the specified dimension range.
static TemporalCoordinateSystem getTemporalCS(CoordinateSystem cs)
          Deprecated. Returns the first temporal coordinate system found in a coordinate system, or null if there is none.
static VerticalCoordinateSystem getVerticalCS(CoordinateSystem cs)
          Deprecated. Returns the first vertical coordinate system found in a coordinate system, or null if there is none.
static java.lang.String toWGS84String(CoordinateSystem cs, java.awt.geom.Rectangle2D bounds)
          Deprecated. Retourne une cha?ne de caract?res repr?sentant la r?gion g?ographique sp?cifi?e.
static java.awt.geom.Rectangle2D transform(MathTransform2D transform, java.awt.geom.Rectangle2D source, java.awt.geom.Rectangle2D dest)
          Deprecated. Transform an envelope.
static Envelope transform(MathTransform transform, Envelope envelope)
          Deprecated. Transform an envelope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDimensionOf

public static int getDimensionOf(CoordinateSystem cs,
                                 AxisInfo axis)
Deprecated. 
Returns the dimension of the first axis of a particular type. For example, getDimensionOf(cs, AxisInfo.TIME) would returns the dimension number of time axis. If no such dimension is found, then this method returns -1.


getDimensionOf

public static int getDimensionOf(CoordinateSystem cs,
                                 java.lang.Class type)
Deprecated. 
Returns the dimension of the first coordinate system of the given type. The type argument must be assignable from CoordinateSystem. If no such dimension is found, then this method returns -1.


getSubCoordinateSystem

public static CoordinateSystem getSubCoordinateSystem(CoordinateSystem cs,
                                                      int lower,
                                                      int upper)
Deprecated. 
Returns a sub-coordinate system for the specified dimension range.

Parameters:
cs - The coordinate system to decompose.
lower - The first dimension to keep, inclusive.
upper - The last dimension to keep, exclusive.
Returns:
The sub-coordinate system, or null if cs can't be decomposed for dimensions in the range [lower..upper].

getCoordinateSystem2D

public static CoordinateSystem getCoordinateSystem2D(CoordinateSystem cs)
                                              throws org.opengis.referencing.operation.TransformException
Deprecated. 
Returns a two-dimensional coordinate system representing the two first dimensions of the specified coordinate system. If cs is already a two-dimensional coordinate system, then it is returned unchanged. Otherwise, if it is a CompoundCoordinateSystem, then the head coordinate system is examined.

Parameters:
cs - The coordinate system, or null.
Returns:
A two-dimensional coordinate system that represents the two first dimensions of cs, or null if cs was null.
Throws:
org.opengis.referencing.operation.TransformException - if cs can't be reduced to a two-coordinate system. We use this exception class since this method is usually invoked in the context of a transformation process.

getHorizontalCS

public static HorizontalCoordinateSystem getHorizontalCS(CoordinateSystem cs)
Deprecated. 
Returns the first horizontal coordinate system found in a coordinate system, or null if there is none.


getVerticalCS

public static VerticalCoordinateSystem getVerticalCS(CoordinateSystem cs)
Deprecated. 
Returns the first vertical coordinate system found in a coordinate system, or null if there is none.


getTemporalCS

public static TemporalCoordinateSystem getTemporalCS(CoordinateSystem cs)
Deprecated. 
Returns the first temporal coordinate system found in a coordinate system, or null if there is none.


getProjection

public static Projection getProjection(CoordinateSystem cs)
Deprecated. 
Returns the first projection found in a coordinate system, or null if there is none.


getEllipsoid

public static Ellipsoid getEllipsoid(CoordinateSystem cs)
Deprecated. 
Returns the first ellipsoid found in a coordinate system, or null if there is none.


getHeadGeoEllipsoid

public static Ellipsoid getHeadGeoEllipsoid(CoordinateSystem coordinateSystem)
Deprecated. 
Returns the ellipsoid used by the specified coordinate system, providing that the two first dimensions use an instance of GeographicCoordinateSystem. Otherwise (i.e. if the two first dimensions are not geographic), returns null.


transform

public static Envelope transform(MathTransform transform,
                                 Envelope envelope)
                          throws org.opengis.referencing.operation.TransformException
Deprecated. 
Transform an envelope. The transformation is only approximative.

Parameters:
transform - The transform to use.
envelope - Envelope to transform. This envelope will not be modified.
Returns:
The transformed envelope. It may not have the same number of dimensions than the original envelope.
Throws:
org.opengis.referencing.operation.TransformException - if a transform failed.

transform

public static java.awt.geom.Rectangle2D transform(MathTransform2D transform,
                                                  java.awt.geom.Rectangle2D source,
                                                  java.awt.geom.Rectangle2D dest)
                                           throws org.opengis.referencing.operation.TransformException
Deprecated. 
Transform an envelope. The transformation is only approximative. Invoking this method is equivalent to invoking the following:
transform(transform, new Envelope(source)).toRectangle2D()

Parameters:
transform - The transform to use. Source and target dimension must be 2.
source - The rectangle to transform (may be null).
dest - The destination rectangle (may be source). If null, a new rectangle will be created and returned.
Returns:
dest, or a new rectangle if dest was non-null and source was null.
Throws:
org.opengis.referencing.operation.TransformException - if a transform failed.

deltaTransform

public static java.awt.geom.Point2D deltaTransform(MathTransform2D transform,
                                                   java.awt.geom.Point2D origin,
                                                   java.awt.geom.Point2D source,
                                                   java.awt.geom.Point2D dest)
                                            throws org.opengis.referencing.operation.TransformException
Deprecated. 
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.
origin - The position where to compute the delta transform in the source CS.
source - The distance vector to be delta transformed
dest - The resulting transformed distance vector, or null
Returns:
The result of the transformation.
Throws:
org.opengis.referencing.operation.TransformException - if the transformation failed.
See Also:
AffineTransform.deltaTransform(Point2D,Point2D)

toWGS84String

public static java.lang.String toWGS84String(CoordinateSystem cs,
                                             java.awt.geom.Rectangle2D bounds)
Deprecated. 
Retourne une cha?ne de caract?res repr?sentant la r?gion g?ographique sp?cifi?e. La cha?ne retourn?e sera de la forme "45?00.00'N-50?00.00'N 30?00.00'E-40?00.00'E". Si une projection cartographique est n?cessaire pour obtenir cette repr?sentation, elle sera faite automatiquement. Cette cha?ne sert surtout ? des fins de d?boguage et sa forme peut varier.



Copyright © GeoTools. All Rights Reserved.