org.geotoolkit.referencing
Class CRS

Object
  extended by Static
      extended by CRS

public final class CRS
extends Static

Utility class for making use of the Coordinate Reference System and associated Factory implementations. This utility class is made up of static functions working with arbitrary implementations of GeoAPI interfaces.

The methods defined in this class can be grouped in three categories:

Since:
2.1
Version:
3.19
Author:
Martin Desruisseaux (IRD, Geomatys), Jody Garnett (Refractions), Andrea Aime (TOPP)
See Also:
IdentifiedObjects, Envelopes
Module:
referencing/geotk-referencing (download)    View source code for this class

Method Summary
static CoordinateReferenceSystem decode(String code)
          Returns a Coordinate Reference System for the specified code.
static CoordinateReferenceSystem decode(String code, boolean longitudeFirst)
          Returns a Coordinate Reference System for the specified code, maybe forcing the axis order to (longitude, latitude).
static double[] deltaTransform(MathTransform transform, DirectPosition origin, double... vector)
          Transforms the given relative distance using the given transform.
static boolean equalsApproximatively(Object object1, Object object2)
          Compares the specified objects for equality, ignoring metadata and slight differences in numerical values.
static boolean equalsIgnoreMetadata(Object object1, Object object2)
          Compares the specified objects for equality, ignoring metadata.
static MathTransform findMathTransform(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS)
          Grabs a transform between two Coordinate Reference Systems.
static MathTransform findMathTransform(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, boolean lenient)
          Grab a transform between two Coordinate Reference Systems.
static CRSAuthorityFactory getAuthorityFactory(Boolean longitudeFirst)
          Returns the CRS authority factory used by the decode methods.
static CompoundCRS getCompoundCRS(CompoundCRS crs, SingleCRS... components)
          Returns the first compound CRS which contains only the given components, in any order.
static CoordinateOperationFactory getCoordinateOperationFactory(boolean lenient)
          Returns the coordinate operation factory used by findMathTransform convenience methods.
static Datum getDatum(CoordinateReferenceSystem crs)
          Returns the datum of the specified CRS, or null if none.
static Ellipsoid getEllipsoid(CoordinateReferenceSystem crs)
          Returns the first ellipsoid found in a coordinate reference system, or null if there is none.
static Envelope getEnvelope(CoordinateReferenceSystem crs)
          Returns the domain of validity for the specified coordinate reference system, or null if unknown.
static GeographicBoundingBox getGeographicBoundingBox(CoordinateReferenceSystem crs)
          Returns the valid geographic area for the specified coordinate reference system, or null if unknown.
static SingleCRS getHorizontalCRS(CoordinateReferenceSystem crs)
          Returns the first horizontal coordinate reference system found in the given CRS, or null if there is none.
static ProjectedCRS getProjectedCRS(CoordinateReferenceSystem crs)
          Returns the first projected coordinate reference system found in a the given CRS, or null if there is none.
static CoordinateReferenceSystem getSubCRS(CoordinateReferenceSystem crs, int lower, int upper)
          Returns the coordinate reference system in the given range of dimension indices.
static Set<String> getSupportedAuthorities(boolean returnAliases)
          Returns the set of the authority identifiers supported by registered authority factories.
static Set<String> getSupportedCodes(String authority)
          Gets the list of the codes that are supported by the given authority.
static TemporalCRS getTemporalCRS(CoordinateReferenceSystem crs)
          Returns the first temporal coordinate reference system found in the given CRS, or null if there is none.
static Version getVersion(String authority)
          Returns the version number of the specified authority database, or null if not available.
static VerticalCRS getVerticalCRS(CoordinateReferenceSystem crs)
          Returns the first vertical coordinate reference system found in a the given CRS, or null if there is none.
static boolean isHorizontalCRS(CoordinateReferenceSystem crs)
          Returns true if the given CRS is horizontal.
static CoordinateReferenceSystem parseWKT(String wkt)
          Parses a Well Known Text (WKT) into a CRS object.
static void reset(String aspects)
          Resets some aspects of the referencing system.
static GeneralEnvelope transform(CoordinateOperation operation, Envelope envelope)
          Transforms an envelope using the given coordinate operation.
static Rectangle2D transform(CoordinateOperation operation, Rectangle2D envelope, Rectangle2D destination)
          Transforms a rectangular envelope using the given coordinate operation.
static Envelope transform(Envelope envelope, CoordinateReferenceSystem targetCRS)
          Transforms the given envelope to the specified CRS.
static Rectangle2D transform(MathTransform2D transform, Rectangle2D envelope, Rectangle2D destination)
          Transforms a rectangular envelope using the given math transform.
static GeneralEnvelope transform(MathTransform transform, Envelope envelope)
          Transforms an envelope using the given math transform.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAuthorityFactory

public static CRSAuthorityFactory getAuthorityFactory(Boolean longitudeFirst)
                                               throws FactoryRegistryException
Returns the CRS authority factory used by the decode methods. This factory uses a cache, scans over all factories and uses additional factories as fallbacks if there is more than one registered factory for the same authority.

This factory can be used as a kind of system-wide factory for all authorities. However for more determinist behavior, consider using a more specific factory (as returned by AuthorityFactoryFinder.getCRSAuthorityFactory(java.lang.String, org.geotoolkit.factory.Hints)) when the authority is known.

Parameters:
longitudeFirst - true if axis order should be forced to (longitude, latitude), false if no order should be forced (i.e. the standard specified by the authority is respected), or null for the system default.
Returns:
The CRS authority factory.
Throws:
FactoryRegistryException - if the factory can't be created.
Since:
2.3
See Also:
Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER

getCoordinateOperationFactory

public static CoordinateOperationFactory getCoordinateOperationFactory(boolean lenient)
Returns the coordinate operation factory used by findMathTransform convenience methods.

Parameters:
lenient - true if the coordinate operations should be created even when there is no information available for a datum shift.
Returns:
The coordinate operation factory used for finding math transform in this class.
Since:
2.4
See Also:
Hints.LENIENT_DATUM_SHIFT

getVersion

public static Version getVersion(String authority)
                          throws FactoryRegistryException
Returns the version number of the specified authority database, or null if not available.

Parameters:
authority - The authority name (typically "EPSG").
Returns:
The version number of the authority database, or null if unknown.
Throws:
FactoryRegistryException - if no CRSAuthorityFactory implementation was found for the specified authority.
Since:
2.4
See Also:
Hints.VERSION

getSupportedCodes

public static Set<String> getSupportedCodes(String authority)
Gets the list of the codes that are supported by the given authority. For example getSupportedCodes("EPSG") may returns "EPSG:2000", "EPSG:2001", "EPSG:2002", etc. It may also returns "2000", "2001", "2002", etc. without the "EPSG:" prefix. Whatever the authority name is prefixed or not is factory implementation dependent.

If there is more than one factory for the given authority, then this method merges the code set of all of them. If a factory fails to provide a set of supported code, then this particular factory is ignored. Please be aware of the following potential issues:

If a more determinist behavior is wanted, consider the code below instead. The following code exploit only one factory, the "preferred" one.

factory = AuthorityFactoryFinder.getCRSAuthorityFactory(authority, null);
Set<String> codes = factory.getAuthorityCodes(CoordinateReferenceSystem.class);
String code = ...  // Choose a code here.
CoordinateReferenceSystem crs = factory.createCoordinateReferenceSystem(code);

Parameters:
authority - The authority name (for example "EPSG").
Returns:
The set of supported codes. May be empty, but never null.
See Also:
AuthorityFactory.getAuthorityCodes(Class), List of authority codes

getSupportedAuthorities

public static Set<String> getSupportedAuthorities(boolean returnAliases)
Returns the set of the authority identifiers supported by registered authority factories. This method search only for CRS authority factories.

Parameters:
returnAliases - If true, the set will contain all identifiers for each authority. If false, only the first one
Returns:
The set of supported authorities. May be empty, but never null.
Since:
2.3.1

decode

public static CoordinateReferenceSystem decode(String code)
                                        throws NoSuchAuthorityCodeException,
                                               FactoryException
Returns a Coordinate Reference System for the specified code. Note that the code needs to mention the authority. Examples:

If there is more than one factory implementation for the same authority, then all additional factories are fallbacks to be used only when the first acceptable factory failed to create the requested CRS object.

Common codes
A few commonly used codes are:

Caching
CRS objects created by previous calls to this method are cached using weak references. Subsequent calls to this method with the same authority code should be fast, unless the CRS object has been garbage collected.

Parameters:
code - The Coordinate Reference System authority code.
Returns:
The Coordinate Reference System for the provided code.
Throws:
NoSuchAuthorityCodeException - If the code could not be understood.
FactoryException - if the CRS creation failed for an other reason.
See Also:
getSupportedCodes(String), Units.valueOfEPSG(int), List of authority codes

decode

public static CoordinateReferenceSystem decode(String code,
                                               boolean longitudeFirst)
                                        throws NoSuchAuthorityCodeException,
                                               FactoryException
Returns a Coordinate Reference System for the specified code, maybe forcing the axis order to (longitude, latitude). The code argument value is parsed as in decode(code). The longitudeFirst argument is the value to be given to the FORCE_LONGITUDE_FIRST_AXIS_ORDER hint.

Example: by default, CRS.decode("EPSG:4326") returns a Geographic CRS with (latitude, longitude) axis order, while CRS.decode("EPSG:4326", true) returns the same CRS except for axis order, which is (longitude, latitude).

Parameters:
code - The Coordinate Reference System authority code.
longitudeFirst - true if axis order should be forced to (longitude, latitude), false if no order should be forced (i.e. the standard specified by the authority is respected).
Returns:
The Coordinate Reference System for the provided code.
Throws:
NoSuchAuthorityCodeException - If the code could not be understood.
FactoryException - if the CRS creation failed for an other reason.
Since:
2.3
See Also:
Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, LongitudeFirstEpsgFactory, List of authority codes

parseWKT

public static CoordinateReferenceSystem parseWKT(String wkt)
                                          throws FactoryException
Parses a Well Known Text (WKT) into a CRS object. This convenience method is a shorthand for the following:
FactoryFinder.getCRSFactory(null).createFromWKT(wkt);

Parameters:
wkt - The WKT string to parse.
Returns:
The parsed coordinate reference system.
Throws:
FactoryException - if the given WKT can't be parsed.
See Also:
Envelopes.parseWKT(String), IdentifiedObject.toWKT()

getEnvelope

public static Envelope getEnvelope(CoordinateReferenceSystem crs)
Returns the domain of validity for the specified coordinate reference system, or null if unknown. The returned envelope is expressed in terms of the specified CRS.

This method looks in two places:

Note that this method is also accessible from the Envelopes class.

Parameters:
crs - The coordinate reference system, or null.
Returns:
The envelope in terms of the specified CRS, or null if none.
Since:
2.2
See Also:
getGeographicBoundingBox(CoordinateReferenceSystem), Envelopes.getDomainOfValidity(CoordinateReferenceSystem), GeneralEnvelope.reduceToDomain(boolean)

getGeographicBoundingBox

public static GeographicBoundingBox getGeographicBoundingBox(CoordinateReferenceSystem crs)
Returns the valid geographic area for the specified coordinate reference system, or null if unknown. This method fetches the domain of validity associated with the given CRS. Only geographic extents of kind geographic bounding box are taken in account.

Parameters:
crs - The coordinate reference system, or null.
Returns:
The geographic area, or null if none.
Since:
2.3
See Also:
getEnvelope(CoordinateReferenceSystem)

isHorizontalCRS

public static boolean isHorizontalCRS(CoordinateReferenceSystem crs)
Returns true if the given CRS is horizontal. This method is provided because there is a direct way to determine if a CRS is vertical or temporal, but no direct way to determine if it is horizontal. So this method complements the check for spatio-temporal components as below:

This method considers a CRS as horizontal if it is two-dimensional and comply with one of the following conditions:

The last condition (GeneralDerivedCRS based on a horizontal CRS) allows for example to express the coordinates of a projected CRS (which use a Cartesian coordinate system) in a polar coordinate system and still consider the result as horizontal. However this assumes that the axes of the derived CRS are coplanar with the axes of the base CRS. This is not always true since a derived CRS could be created for an inclined plane, for example a plane fitting the slope of a mountain. ISO 19111 does not specify how to handle this case. In the Geotk implementation, we suggest to define a new datum for inclined plane which is not a geodetic datum.

Parameters:
crs - The coordinate reference system, or null.
Returns:
true if the given CRS is non-null and comply with one of the above conditions, or false otherwise.
Since:
3.05
See Also:
getHorizontalCRS(CoordinateReferenceSystem)

getHorizontalCRS

public static SingleCRS getHorizontalCRS(CoordinateReferenceSystem crs)
Returns the first horizontal coordinate reference system found in the given CRS, or null if there is none. A horizontal CRS is usually a two-dimensional geographic or projected CRS. See the isHorizontalCRS method for a more accurate description about the conditions for a CRS to be considered horizontal.

Parameters:
crs - The coordinate reference system, or null.
Returns:
The horizontal CRS, or null if none.
Since:
2.4

getProjectedCRS

public static ProjectedCRS getProjectedCRS(CoordinateReferenceSystem crs)
Returns the first projected coordinate reference system found in a the given CRS, or null if there is none.

Parameters:
crs - The coordinate reference system, or null.
Returns:
The projected CRS, or null if none.
Since:
2.4

getVerticalCRS

public static VerticalCRS getVerticalCRS(CoordinateReferenceSystem crs)
Returns the first vertical coordinate reference system found in a the given CRS, or null if there is none.

Parameters:
crs - The coordinate reference system, or null.
Returns:
The vertical CRS, or null if none.
Since:
2.4

getTemporalCRS

public static TemporalCRS getTemporalCRS(CoordinateReferenceSystem crs)
Returns the first temporal coordinate reference system found in the given CRS, or null if there is none.

Parameters:
crs - The coordinate reference system, or null.
Returns:
The temporal CRS, or null if none.
Since:
2.4

getCompoundCRS

public static CompoundCRS getCompoundCRS(CompoundCRS crs,
                                         SingleCRS... components)
Returns the first compound CRS which contains only the given components, in any order. First, this method gets the SingleCRS components of the given compound CRS. If all those components are equal, ignoring metadata and order, to the SingleCRS components given to this method, then the given CompoundCRS is returned. Otherwise if the given CompoundCRS contains nested CompoundCRS, then those nested CRS are inspected recursively by the same algorithm. Otherwise, this method returns null.

This method is useful for extracting metadata about the 3D spatial CRS part in a 4D spatio-temporal CRS. For example given the following CRS:

COMPD_CS["Mercator + height + time",
  COMPD_CS["Mercator + height",
    PROJCS["Mercator", ...etc...]
    VERT_CS["Ellipsoidal height", ...etc...]]
  TemporalCRS["Modified Julian", ...etc...]]
Then the following code will returns the nested COMPD_CS["Mercator + height"] without prior knowledge of the CRS component order (the time CRS could be first, and the vertical CRS could be before the horizontal one):
CompoundCRS crs = ...;
SingleCRS horizontalCRS = getHorizontalCRS(crs);
VerticalCRS verticalCRS = getVerticalCRS(crs);
if (horizontalCRS != null && verticalCRS != null) {
    CompoundCRS spatialCRS = getCompoundCRS(crs, horizontalCRS, verticalCRS);
    if (spatialCRS != null) {
        // ...
    }
}

Parameters:
crs - The compound CRS to compare with the given component CRS, or null.
components - The CRS which must be components of the returned CRS.
Returns:
A CRS which contains the given components, or null if none.
Since:
3.16
See Also:
DefaultCompoundCRS.getSingleCRS()

getSubCRS

public static CoordinateReferenceSystem getSubCRS(CoordinateReferenceSystem crs,
                                                  int lower,
                                                  int upper)
Returns the coordinate reference system in the given range of dimension indices. This method processes as below:

This method does not attempt to build new CRS from the components. For example it does not attempt to create a 3D geographic CRS from a 2D one + a vertical component. If such functionality is desired, consider using the utility methods in ReferencingFactoryContainer instead.

Parameters:
crs - The coordinate reference system to decompose, or null.
lower - The first dimension to keep, inclusive.
upper - The last dimension to keep, exclusive.
Returns:
The sub-coordinate system, or null if the given crs was null or can't be decomposed for dimensions in the range [lower..upper].
Throws:
IndexOutOfBoundsException - If the given index are out of bounds.
Since:
3.16
See Also:
ReferencingFactoryContainer.separate(CoordinateReferenceSystem, int[])

getDatum

public static Datum getDatum(CoordinateReferenceSystem crs)
Returns the datum of the specified CRS, or null if none. This method processes as below:

Parameters:
crs - The coordinate reference system for which to get the datum. May be null.
Returns:
The datum in the given CRS, or null if none.
Since:
3.16
See Also:
getEllipsoid(CoordinateReferenceSystem)

getEllipsoid

public static Ellipsoid getEllipsoid(CoordinateReferenceSystem crs)
Returns the first ellipsoid found in a coordinate reference system, or null if there is none. More specifically:

Note that this method does not check if there is more than one ellipsoid (it should never be the case).

Parameters:
crs - The coordinate reference system, or null.
Returns:
The ellipsoid, or null if none.
Since:
2.4
See Also:
getDatum(CoordinateReferenceSystem)

equalsIgnoreMetadata

public static boolean equalsIgnoreMetadata(Object object1,
                                           Object object2)
Compares the specified objects for equality, ignoring metadata. If this method returns true, then: If a more lenient comparison - allowing slight differences in numerical values - is wanted, then equalsApproximatively(Object, Object) can be used instead.

Implementation note
This is a convenience method for the following method call:

return Utilities.deepEquals(object1, object2, ComparisonMode.IGNORE_METADATA);

Parameters:
object1 - The first object to compare (may be null).
object2 - The second object to compare (may be null).
Returns:
true if both objects are equal, ignoring metadata.
Since:
2.2
See Also:
Utilities.deepEquals(Object, Object, ComparisonMode), ComparisonMode.IGNORE_METADATA

equalsApproximatively

public static boolean equalsApproximatively(Object object1,
                                            Object object2)
Compares the specified objects for equality, ignoring metadata and slight differences in numerical values. If this method returns true, then:

Implementation note
This is a convenience method for the following method call:

return Utilities.deepEquals(object1, object2, ComparisonMode.APPROXIMATIVE);

Parameters:
object1 - The first object to compare (may be null).
object2 - The second object to compare (may be null).
Returns:
true if both objects are approximatively equal.
Since:
3.18
See Also:
Utilities.deepEquals(Object, Object, ComparisonMode), ComparisonMode.APPROXIMATIVE

findMathTransform

public static MathTransform findMathTransform(CoordinateReferenceSystem sourceCRS,
                                              CoordinateReferenceSystem targetCRS)
                                       throws FactoryException
Grabs a transform between two Coordinate Reference Systems. This convenience method is a shorthand for the following:
CoordinateOperationFactory factory = FactoryFinder.getCoordinateOperationFactory(null);
CoordinateOperation operation = factory.createOperation(sourceCRS, targetCRS);
MathTransform transform = operation.getMathTransform();
Note that some metadata like coordinate operation accuracy are lost by this method. If those metadata are wanted, use the coordinate operation factory directly.

Sample use:

CoordinateReferenceSystem sourceCRS = CRS.decode("EPSG:42102");
CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:4326");
MathTransform transform = CRS.findMathTransform(sourceCRS, targetCRS);

Parameters:
sourceCRS - The source CRS.
targetCRS - The target CRS.
Returns:
The math transform from sourceCRS to targetCRS.
Throws:
FactoryException - If no math transform can be created for the specified source and target CRS.
See Also:
CoordinateOperationFactory.createOperation(CoordinateReferenceSystem, CoordinateReferenceSystem)

findMathTransform

public static MathTransform findMathTransform(CoordinateReferenceSystem sourceCRS,
                                              CoordinateReferenceSystem targetCRS,
                                              boolean lenient)
                                       throws FactoryException
Grab a transform between two Coordinate Reference Systems. This method is similar to findMathTransform(sourceCRS, targetCRS), except that it specifies whatever this method should tolerate lenient datum shift. If the lenient argument is true, then this method will not throw a "Bursa-Wolf parameters required" exception during datum shifts if the Bursa-Wolf parameters are not specified. Instead it will assume a no datum shift.

Parameters:
sourceCRS - The source CRS.
targetCRS - The target CRS.
lenient - true if the math transform should be created even when there is no information available for a datum shift. if this argument is not specified, then the default value is determined from the system default.
Returns:
The math transform from sourceCRS to targetCRS.
Throws:
FactoryException - If no math transform can be created for the specified source and target CRS.
See Also:
Hints.LENIENT_DATUM_SHIFT, CoordinateOperationFactory.createOperation(CoordinateReferenceSystem, CoordinateReferenceSystem)

transform

public static Envelope transform(Envelope envelope,
                                 CoordinateReferenceSystem targetCRS)
                          throws TransformException
Transforms the given envelope to the specified CRS. If the given envelope is null, or the envelope CRS is null, or the given target CRS is null, or the transform is identity, then the envelope is returned unchanged. Otherwise a new transformed envelope is returned.

See Envelopes.transform(Envelope, CoordinateReferenceSystem) for more information. This method delegates its work to the above-cited Envelopes class and is defined in this CRS class only for convenience.

Parameters:
envelope - The envelope to transform (may be null).
targetCRS - The target CRS (may be null).
Returns:
A new transformed envelope, or directly envelope if no transformation was required.
Throws:
TransformException - If a transformation was required and failed.
Since:
2.5

transform

public static GeneralEnvelope transform(MathTransform transform,
                                        Envelope envelope)
                                 throws TransformException
Transforms an envelope using the given math transform. The transformation is only approximative: the returned envelope may be bigger than necessary, or smaller than required if the bounding box contains a pole.

See Envelopes.transform(MathTransform, Envelope) for more information. This method delegates its work to the above-cited Envelopes class and is defined in this CRS class only for convenience.

Parameters:
transform - The transform to use.
envelope - Envelope to transform, or null. This envelope will not be modified.
Returns:
The transformed envelope, or null if envelope was null.
Throws:
TransformException - if a transform failed.
Since:
2.4

transform

public static GeneralEnvelope transform(CoordinateOperation operation,
                                        Envelope envelope)
                                 throws TransformException
Transforms an envelope using the given coordinate operation. The transformation is only approximative: the returned envelope may be bigger than the smallest possible bounding box, but should not be smaller in most cases.

See Envelopes.transform(CoordinateOperation, Envelope) for more information. This method delegates its work to the above-cited Envelopes class and is defined in this CRS class only for convenience.

Parameters:
operation - The operation to use.
envelope - Envelope to transform, or null. This envelope will not be modified.
Returns:
The transformed envelope, or null if envelope was null.
Throws:
TransformException - if a transform failed.
Since:
2.4

transform

public static Rectangle2D transform(MathTransform2D transform,
                                    Rectangle2D envelope,
                                    Rectangle2D destination)
                             throws TransformException
Transforms a rectangular envelope using the given math transform. The transformation is only approximative: the returned envelope may be bigger than necessary, or smaller than required if the bounding box contains a pole.

See Envelopes.transform(MathTransform2D, Rectangle2D, Rectangle2D) for more information. This method delegates its work to the above-cited Envelopes class and is defined in this CRS class only for convenience.

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

transform

public static Rectangle2D transform(CoordinateOperation operation,
                                    Rectangle2D envelope,
                                    Rectangle2D destination)
                             throws TransformException
Transforms a rectangular envelope using the given coordinate operation. The transformation is only approximative: the returned envelope may be bigger than the smallest possible bounding box, but should not be smaller in most cases.

See Envelopes.transform(CoordinateOperation, Rectangle2D, Rectangle2D) for more information. This method delegates its work to the above-cited Envelopes class and is defined in this CRS class only for convenience.

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

deltaTransform

public static double[] deltaTransform(MathTransform transform,
                                      DirectPosition origin,
                                      double... vector)
                               throws TransformException
Transforms the given relative distance using the given transform. A relative distance vector is transformed without applying the translation components. However it needs to be computed at a particular location, given by the origin parameter in units of the source CRS.

Parameters:
transform - The transformation to apply.
origin - The position where to compute the delta transform in the source CRS.
vector - The distance vector to be delta transformed.
Returns:
The result of the delta transformation.
Throws:
TransformException - if the transformation failed.
Since:
3.10 (derived from 2.3)
See Also:
AffineTransform.deltaTransform(Point2D, Point2D)

reset

public static void reset(String aspects)
Resets some aspects of the referencing system. The aspects to be reset are specified by a space or comma delimited string, which may include any of the following elements:

Parameters:
aspects - The aspects to reset, or "all" for all of them. Unknown aspects are silently ignored.
Since:
2.5


Copyright © 2009-2011 Geotoolkit.org. All Rights Reserved.