| org.geotools.referencing.AbstractIdentifiedObject org.geotools.referencing.AbstractReferenceSystem org.geotools.referencing.crs.AbstractCRS
All known Subclasses: org.geotools.referencing.crs.DefaultCompoundCRS, org.geotools.referencing.crs.AbstractSingleCRS,
Field Summary | |
final protected CoordinateSystem | coordinateSystem The coordinate system. |
Constructor Summary | |
public | AbstractCRS(CoordinateReferenceSystem crs) Constructs a new coordinate reference system 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. | public | AbstractCRS(Map properties, CoordinateSystem cs) Constructs a coordinate reference system from a set of properties. |
Method Summary | |
public Measure | distance(double[] coord1, double[] coord2) Computes the distance between two points. | public boolean | equals(AbstractIdentifiedObject object, boolean compareMetadata) Compare this coordinate reference system with the specified object for equality.
If
compareMetadata is
true , then all available properties are
compared including
and
.
Parameters: object - The object to compare to this . Parameters: compareMetadata - true for performing a strict comparaison, or false for comparing only properties relevant to transformations. | void | formatDefaultWKT(Formatter formatter) Default implementation of
AbstractCRS.formatWKT . | protected String | formatWKT(Formatter formatter) Formats the inner part of a
Well
Known Text (WKT) element. | public CoordinateSystem | getCoordinateSystem() Returns the coordinate system. | final Unit | getUnit() Returns the unit used for all axis. | public int | hashCode() Returns a hash value for this CRS. | static Map | name(int key) Creates a name for the predefined constants in subclasses. |
coordinateSystem | final protected CoordinateSystem coordinateSystem(Code) | | The coordinate system.
|
AbstractCRS | public AbstractCRS(CoordinateReferenceSystem crs)(Code) | | Constructs a new coordinate reference system 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 |
AbstractCRS | public AbstractCRS(Map properties, CoordinateSystem cs)(Code) | | Constructs a coordinate reference system from a set of properties. The properties are given
unchanged to the
.
Parameters: properties - Set of properties. Should contains at least "name" . Parameters: cs - The coordinate system. |
distance | public Measure distance(double[] coord1, double[] coord2) throws UnsupportedOperationException, MismatchedDimensionException(Code) | | Computes the distance between two points. This convenience method delegates the work to
the underlyling
, if possible.
Parameters: coord1 - Coordinates of the first point. Parameters: coord2 - Coordinates of the second point. The distance between coord1 and coord2 . throws: UnsupportedOperationException - if this coordinate reference system can't computedistances. throws: MismatchedDimensionException - if a coordinate doesn't have the expected dimension. |
equals | public boolean equals(AbstractIdentifiedObject object, boolean compareMetadata)(Code) | | Compare this coordinate reference system with the specified object for equality.
If
compareMetadata is
true , then all available properties are
compared including
and
.
Parameters: object - The object to compare to this . Parameters: compareMetadata - true for performing a strict comparaison, or false for comparing only properties relevant to transformations. true if both objects are equal. |
formatWKT | protected String formatWKT(Formatter formatter)(Code) | | Formats the inner part of a
Well
Known Text (WKT) element. The default implementation writes the following
elements:
- The
, if any.
- The unit if all axis use the same unit. Otherwise the unit is omitted and
the WKT format is
.
- All
's axis.
Parameters: formatter - The formatter to use. The name of the WKT element type (e.g. "GEOGCS" ). |
getCoordinateSystem | public CoordinateSystem getCoordinateSystem()(Code) | | Returns the coordinate system.
|
getUnit | final Unit getUnit()(Code) | | Returns the unit used for all axis. If not all axis uses the same unit,
then this method returns
null . This method is often used for
Well Know Text (WKT) formatting.
|
hashCode | public int hashCode()(Code) | | Returns a hash value for this CRS.
,
and
are not taken in account. In other words, two CRS objects will return the same
hash value if they are equal in the sense of
AbstractCRS.equals(AbstractIdentifiedObject,boolean) equals (AbstractIdentifiedObject,
false) .
The hash code value. This value doesn't need to be the samein past or future versions of this class. |
name | static Map name(int key)(Code) | | Creates a name for the predefined constants in subclasses. The name is an unlocalized String
object. However, since this method is used for creation of convenience objects only (not for
objects created from an "official" database), the "unlocalized" name is actually choosen
according the user's locale at class initialization time. The same name is also added in
a localizable form as an alias. Since the
AbstractCRS.nameMatches convenience method checks
the alias, it still possible to consider two objects are equivalent even if their names
were formatted in different locales.
|
Methods inherited from org.geotools.referencing.AbstractIdentifiedObject | protected static Set asSet(Object[] array)(Code)(Java Doc) protected static void ensureAngularUnit(Unit unit) throws IllegalArgumentException(Code)(Java Doc) protected static void ensureLinearUnit(Unit unit) throws IllegalArgumentException(Code)(Java Doc) protected static void ensureNonNull(String name, Object object) throws IllegalArgumentException(Code)(Java Doc) protected static void ensureNonNull(String name, Object[] array, int index) throws IllegalArgumentException(Code)(Java Doc) protected static void ensureTimeUnit(Unit unit) throws IllegalArgumentException(Code)(Java Doc) final public boolean equals(Object object)(Code)(Java Doc) public boolean equals(AbstractIdentifiedObject object, boolean compareMetadata)(Code)(Java Doc) protected static boolean equals(IdentifiedObject object1, IdentifiedObject object2, boolean compareMetadata)(Code)(Java Doc) protected static boolean equals(IdentifiedObject[] array1, IdentifiedObject[] array2, boolean compareMetadata)(Code)(Java Doc) protected static boolean equals(Collection collection1, Collection collection2, boolean compareMetadata)(Code)(Java Doc) public Collection getAlias()(Code)(Java Doc) public ReferenceIdentifier getIdentifier(Citation authority)(Code)(Java Doc) public static ReferenceIdentifier getIdentifier(IdentifiedObject info, Citation authority)(Code)(Java Doc) public Set getIdentifiers()(Code)(Java Doc) public ReferenceIdentifier getName()(Code)(Java Doc) public String getName(Citation authority)(Code)(Java Doc) public static String getName(IdentifiedObject info, Citation authority)(Code)(Java Doc) public static Map getProperties(IdentifiedObject info)(Code)(Java Doc) public static Map getProperties(IdentifiedObject info, Citation authority)(Code)(Java Doc) public InternationalString getRemarks()(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public boolean nameMatches(String name)(Code)(Java Doc) public static boolean nameMatches(IdentifiedObject object, String name)(Code)(Java Doc) public static boolean nameMatches(IdentifiedObject o1, IdentifiedObject o2)(Code)(Java Doc)
|
|
|