public abstract class AbstractCRS extends AbstractReferenceSystem implements CoordinateReferenceSystem
AbstractCS
,
AbstractDatum
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected CoordinateSystem |
coordinateSystem
The coordinate system.
|
EMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATOR
SINGLE_LINE
DOMAIN_OF_VALIDITY_KEY, SCOPE_KEY
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
Constructor and Description |
---|
AbstractCRS(CoordinateReferenceSystem crs)
Constructs a new coordinate reference system with the same values than the specified one.
|
AbstractCRS(Map<String,?> properties,
CoordinateSystem cs)
Constructs a coordinate reference system from a set of properties.
|
Modifier and Type | Method and Description |
---|---|
Measure |
distance(double[] coord1,
double[] coord2)
Computes the distance between two points.
|
boolean |
equals(AbstractIdentifiedObject object,
boolean compareMetadata)
Compare this coordinate reference system with the specified object for equality.
|
protected String |
formatWKT(Formatter formatter)
Formats the inner part of a Well
Known Text (WKT) element.
|
CoordinateSystem |
getCoordinateSystem()
Returns the coordinate system.
|
int |
hashCode()
Returns a hash value for this CRS.
|
getDomainOfValidity, getScope, getValidArea
asSet, ensureAngularUnit, ensureLinearUnit, ensureNonNull, ensureNonNull, ensureTimeUnit, equals, equals, equals, equals, getAlias, getIdentifier, getIdentifier, getIdentifiers, getName, getName, getName, getProperties, getProperties, getRemarks, nameMatches, nameMatches, nameMatches
cleanupThreadLocals, toString, toWKT, toWKT, toWKT, toWKT
getDomainOfValidity, getScope
getAlias, getIdentifiers, getName, getRemarks, toWKT
protected final CoordinateSystem coordinateSystem
public AbstractCRS(CoordinateReferenceSystem crs)
crs
- The coordinate reference system to copy.public AbstractCRS(Map<String,?> properties, CoordinateSystem cs)
properties
- Set of properties. Should contains at least "name"
.cs
- The coordinate system.public CoordinateSystem getCoordinateSystem()
getCoordinateSystem
in interface CoordinateReferenceSystem
public Measure distance(double[] coord1, double[] coord2) throws UnsupportedOperationException, MismatchedDimensionException
coord1
- Coordinates of the first point.coord2
- Coordinates of the second point.coord1
and coord2
.UnsupportedOperationException
- if this coordinate reference system can't compute
distances.MismatchedDimensionException
- if a coordinate doesn't have the expected dimension.public boolean equals(AbstractIdentifiedObject object, boolean compareMetadata)
compareMetadata
is true
, then all available properties are compared including
valid area and scope.equals
in class AbstractReferenceSystem
object
- The object to compare to this
.compareMetadata
- true
for performing a strict comparaison, or false
for
comparing only properties relevant to transformations.true
if both objects are equal.public int hashCode()
equals
(AbstractIdentifiedObject,
false)
.hashCode
in class AbstractIdentifiedObject
protected String formatWKT(Formatter formatter)
formatWKT
in class Formattable
formatter
- The formatter to use."GEOGCS"
).Formattable.toWKT()
,
Formattable.toString()
Copyright © 1996–2019 Geotools. All rights reserved.