org.geotools.referencing.crs
Class DefaultProjectedCRS

java.lang.Object
  extended byorg.geotools.referencing.wkt.Formattable
      extended byorg.geotools.referencing.AbstractIdentifiedObject
          extended byorg.geotools.referencing.AbstractReferenceSystem
              extended byorg.geotools.referencing.crs.AbstractCRS
                  extended byorg.geotools.referencing.crs.AbstractSingleCRS
                      extended byorg.geotools.referencing.crs.AbstractDerivedCRS
                          extended byorg.geotools.referencing.crs.DefaultProjectedCRS
All Implemented Interfaces:
org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.crs.GeneralDerivedCRS, org.opengis.referencing.IdentifiedObject, org.opengis.referencing.crs.ProjectedCRS, org.opengis.referencing.ReferenceSystem, java.io.Serializable, org.opengis.referencing.crs.SingleCRS

public class DefaultProjectedCRS
extends AbstractDerivedCRS
implements org.opengis.referencing.crs.ProjectedCRS

A 2D coordinate reference system used to approximate the shape of the earth on a planar surface. It is done in such a way that the distortion that is inherent to the approximation is carefully controlled and known. Distortion correction is commonly applied to calculated bearings and distances to produce values that are a close match to actual field values.

Used with CS type(s)
Cartesian

Since:
2.1
Version:
$Id: DefaultProjectedCRS.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Martin Desruisseaux
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.geotools.referencing.crs.AbstractDerivedCRS
_COMPARING, baseCRS, conversionFromBase
 
Fields inherited from class org.geotools.referencing.crs.AbstractSingleCRS
datum
 
Fields inherited from class org.geotools.referencing.crs.AbstractCRS
coordinateSystem
 
Fields inherited from class org.geotools.referencing.AbstractIdentifiedObject
EMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATOR
 
Fields inherited from interface org.opengis.referencing.ReferenceSystem
SCOPE_KEY, VALID_AREA_KEY
 
Fields inherited from interface org.opengis.referencing.IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
 
Constructor Summary
DefaultProjectedCRS(java.util.Map properties, org.opengis.referencing.operation.Conversion conversionFromBase, org.opengis.referencing.crs.GeographicCRS base, org.opengis.referencing.operation.MathTransform baseToDerived, org.opengis.referencing.cs.CartesianCS derivedCS)
          Constructs a projected CRS from a defining conversion.
DefaultProjectedCRS(java.util.Map properties, org.opengis.referencing.operation.OperationMethod method, org.opengis.referencing.crs.GeographicCRS base, org.opengis.referencing.operation.MathTransform baseToDerived, org.opengis.referencing.cs.CartesianCS derivedCS)
          Constructs a projected CRS from a set of properties.
DefaultProjectedCRS(org.opengis.referencing.crs.ProjectedCRS crs)
          Constructs a new projected CRS with the same values than the specified one.
DefaultProjectedCRS(java.lang.String name, org.opengis.referencing.operation.OperationMethod method, org.opengis.referencing.crs.GeographicCRS base, org.opengis.referencing.operation.MathTransform baseToDerived, org.opengis.referencing.cs.CartesianCS derivedCS)
          Constructs a projected CRS from a name.
 
Method Summary
static org.opengis.referencing.operation.Matrix createLinearConversion(org.opengis.referencing.crs.ProjectedCRS sourceCRS, org.opengis.referencing.crs.ProjectedCRS targetCRS, double errorTolerance)
          Returns a conversion from a source to target projected CRS, if this conversion is representable as an affine transform.
protected  java.lang.String formatWKT(Formatter formatter)
          Format the inner part of a Well Known Text (WKT) element.
 int hashCode()
          Returns a hash value for this projected CRS.
 
Methods inherited from class org.geotools.referencing.crs.AbstractDerivedCRS
equals, getBaseCRS, getConversionFromBase
 
Methods inherited from class org.geotools.referencing.crs.AbstractSingleCRS
getAxis, getDatum, getDimension
 
Methods inherited from class org.geotools.referencing.crs.AbstractCRS
distance, getCoordinateSystem
 
Methods inherited from class org.geotools.referencing.AbstractReferenceSystem
getScope, getValidArea
 
Methods inherited from class org.geotools.referencing.AbstractIdentifiedObject
asSet, ensureAngularUnit, ensureLinearUnit, ensureNonNull, ensureNonNull, ensureTimeUnit, equals, equals, equals, equals, getAlias, getIdentifier, getIdentifier, getIdentifiers, getName, getName, getName, getProperties, getProperties, getRemarks, nameMatches, nameMatches
 
Methods inherited from class org.geotools.referencing.wkt.Formattable
toString, toWKT, toWKT, toWKT
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opengis.referencing.crs.GeneralDerivedCRS
getBaseCRS, getConversionFromBase
 
Methods inherited from interface org.opengis.referencing.crs.SingleCRS
getCoordinateSystem, getDatum
 
Methods inherited from interface org.opengis.referencing.ReferenceSystem
getScope, getValidArea
 
Methods inherited from interface org.opengis.referencing.IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
 

Constructor Detail

DefaultProjectedCRS

public DefaultProjectedCRS(org.opengis.referencing.crs.ProjectedCRS crs)
Constructs a new projected CRS with the same values than the specified one. This copy constructor provides a way to wrap an arbitrary implementation into a Geotools one or a user-defined one (as a subclass), usually in order to leverage some implementation-specific API. This constructor performs a shallow copy, i.e. the properties are not cloned.

Since:
2.2

DefaultProjectedCRS

public DefaultProjectedCRS(java.lang.String name,
                           org.opengis.referencing.operation.OperationMethod method,
                           org.opengis.referencing.crs.GeographicCRS base,
                           org.opengis.referencing.operation.MathTransform baseToDerived,
                           org.opengis.referencing.cs.CartesianCS derivedCS)
                    throws org.opengis.spatialschema.geometry.MismatchedDimensionException
Constructs a projected CRS from a name.

Parameters:
name - The name.
method - A description of the method for the conversion.
base - Coordinate reference system to base the derived CRS on.
baseToDerived - The transform from the base CRS to returned CRS.
derivedCS - The coordinate system for the derived CRS. The number of axes must match the target dimension of the transform .
Throws:
org.opengis.spatialschema.geometry.MismatchedDimensionException - if the source and target dimension of don't match the dimension of and respectively.

DefaultProjectedCRS

public DefaultProjectedCRS(java.util.Map properties,
                           org.opengis.referencing.operation.OperationMethod method,
                           org.opengis.referencing.crs.GeographicCRS base,
                           org.opengis.referencing.operation.MathTransform baseToDerived,
                           org.opengis.referencing.cs.CartesianCS derivedCS)
                    throws org.opengis.spatialschema.geometry.MismatchedDimensionException
Constructs a projected CRS from a set of properties. The properties are given unchanged to the super-class constructor.

Parameters:
properties - Name and other properties to give to the new derived CRS object and to the underlying projection.
method - A description of the method for the conversion.
base - Coordinate reference system to base the derived CRS on.
baseToDerived - The transform from the base CRS to returned CRS.
derivedCS - The coordinate system for the derived CRS. The number of axes must match the target dimension of the transform .
Throws:
org.opengis.spatialschema.geometry.MismatchedDimensionException - if the source and target dimension of don't match the dimension of and respectively.

DefaultProjectedCRS

public DefaultProjectedCRS(java.util.Map properties,
                           org.opengis.referencing.operation.Conversion conversionFromBase,
                           org.opengis.referencing.crs.GeographicCRS base,
                           org.opengis.referencing.operation.MathTransform baseToDerived,
                           org.opengis.referencing.cs.CartesianCS derivedCS)
                    throws org.opengis.spatialschema.geometry.MismatchedDimensionException
Constructs a projected CRS from a defining conversion. The properties are given unchanged to the super-class constructor.

Parameters:
properties - Name and other properties to give to the new projected CRS object.
conversionFromBase - The defining conversion.
base - Coordinate reference system to base the projected CRS on.
baseToDerived - The transform from the base CRS to returned CRS.
derivedCS - The coordinate system for the projected CRS. The number of axes must match the target dimension of the transform .
Throws:
org.opengis.spatialschema.geometry.MismatchedDimensionException - if the source and target dimension of don't match the dimension of and respectively.
Method Detail

createLinearConversion

public static org.opengis.referencing.operation.Matrix createLinearConversion(org.opengis.referencing.crs.ProjectedCRS sourceCRS,
                                                                              org.opengis.referencing.crs.ProjectedCRS targetCRS,
                                                                              double errorTolerance)
Returns a conversion from a source to target projected CRS, if this conversion is representable as an affine transform. More specifically, if all projection parameters are identical except the following ones:

Then the conversion between two projected CRS can sometime be represented as a linear conversion. For example if only false easting/northing differ, than the coordinate conversion is simply a translation. If no linear conversion has been found between the two CRS, then this method returns .

Parameters:
sourceCRS - The source coordinate reference system.
targetCRS - The target coordinate reference system.
errorTolerance - Relative error tolerance for considering two parameter values as equal. This is usually a small number like 1E-12.
Returns:
The conversion from to as an affine transform, or if no linear transform has been found.

hashCode

public int hashCode()
Returns a hash value for this projected CRS.

Overrides:
hashCode in class AbstractDerivedCRS
Returns:
The hash code value. This value doesn't need to be the same in past or future versions of this class.

formatWKT

protected java.lang.String formatWKT(Formatter formatter)
Format the inner part of a Well Known Text (WKT) element.

Overrides:
formatWKT in class AbstractDerivedCRS
Parameters:
formatter - The formatter to use.
Returns:
The WKT element name, which is "PROJCS"


Copyright © GeoTools. All Rights Reserved.