public class DefaultGeodeticDatum extends AbstractDatum implements GeodeticDatum
BursaWolfParameters can optionally be associated to each DefaultGeodeticDatum instance.
This association is not part of the ISO 19111 model, but still a common practice (especially in older standards).
Associating Bursa-Wolf parameters to geodetic datum is known as the early-binding approach.
A recommended alternative, discussed below, is the late-binding approach.
The Bursa-Wolf parameters serve two purposes:
Apache SIS searches for datum shift methods (including Bursa-Wolf parameters) in the EPSG database when a
CoordinateOperation or a
MathTransform is requested for a pair of CRS.
This is known as the late-binding approach.
If a datum shift method is found in the database, it will have precedence over any BursaWolfParameters
instance associated to this DefaultGeodeticDatum. Only if no datum shift method is found in the database,
then the BursaWolfParameters associated to the datum may be used as a fallback.
TOWGS84[…] element
with the parameter values of the transformation to the WGS 84 datum. This element is provided as a help
for other Geographic Information Systems that support only the early-binding approach.
Apache SIS usually does not need the TOWGS84 element, except as a fallback for datum that
do not exist in the EPSG database.
GeodeticDatum from one of the static convenience shortcuts listed in
CommonCRS.datum().GeodeticDatum from an identifier in a database by invoking
DatumAuthorityFactory.createGeodeticDatum(String).GeodeticDatum by invoking the DatumFactory.createGeodeticDatum(…) method
(implemented for example by GeodeticObjectFactory).DefaultGeodeticDatum by invoking the
constructor.GeodeticDatum datum = CommonCRS.WGS84.datum();
Ellipsoid and the PrimeMeridian given to the constructor are also immutable. Unless otherwise
noted in the javadoc, this condition holds if all components were created using only SIS factories and static
constants.DefaultEllipsoid,
DefaultPrimeMeridian,
CommonCRS.datum(),
GeodeticAuthorityFactory.createGeodeticDatum(String),
Serialized FormDefined in the sis-referencing module
| Modifier and Type | Field and Description |
|---|---|
static String |
BURSA_WOLF_KEY
The
"bursaWolf" property for
Bursa-Wolf parameters. |
DEPRECATED_KEY, LOCALE_KEYANCHOR_POINT_KEY, DOMAIN_OF_VALIDITY_KEY, REALIZATION_EPOCH_KEY, SCOPE_KEYALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY| Modifier | Constructor and Description |
|---|---|
protected |
DefaultGeodeticDatum(GeodeticDatum datum)
Creates a new datum with the same values than the specified one.
|
|
DefaultGeodeticDatum(Map<String,?> properties,
Ellipsoid ellipsoid,
PrimeMeridian primeMeridian)
Creates a geodetic datum from the given properties.
|
| Modifier and Type | Method and Description |
|---|---|
static DefaultGeodeticDatum |
castOrCopy(GeodeticDatum object)
Returns a SIS datum implementation with the same values than the given arbitrary implementation.
|
protected long |
computeHashCode()
Invoked by
hashCode() for computing the hash code when first needed. |
boolean |
equals(Object object,
ComparisonMode mode)
Compare this datum with the specified object for equality.
|
protected String |
formatTo(Formatter formatter)
Formats this datum as a Well Known Text
Datum[…] element. |
BursaWolfParameters[] |
getBursaWolfParameters()
Returns all Bursa-Wolf parameters specified in the
properties map at construction time. |
Ellipsoid |
getEllipsoid()
Returns the ellipsoid given at construction time.
|
Class<? extends GeodeticDatum> |
getInterface()
Returns the GeoAPI interface implemented by this class.
|
Matrix |
getPositionVectorTransformation(GeodeticDatum targetDatum,
Extent areaOfInterest)
Returns the position vector transformation (geocentric domain) to the specified datum.
|
PrimeMeridian |
getPrimeMeridian()
Returns the prime meridian given at construction time.
|
boolean |
isHeuristicMatchForName(String name)
Returns
true if either the primary name or at least
one alias matches the given string according heuristic rules. |
castOrCopy, getAnchorPoint, getDomainOfValidity, getRealizationEpoch, getScopecastOrCopy, equals, getAlias, getDescription, getIdentifiers, getName, getRemarks, hashCode, isDeprecatedprint, toString, toString, toWKTclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAnchorPoint, getDomainOfValidity, getRealizationEpoch, getScopegetAlias, getIdentifiers, getName, getRemarks, toWKTpublic static final String BURSA_WOLF_KEY
"bursaWolf" property for
Bursa-Wolf parameters.public DefaultGeodeticDatum(Map<String,?> properties, Ellipsoid ellipsoid, PrimeMeridian primeMeridian)
| Property name | Value type | Returned by |
|---|---|---|
| "bursaWolf" | BursaWolfParameters (optionally as array) |
getBursaWolfParameters() |
| Defined in parent classes (reminder) | ||
| "name" | ReferenceIdentifier or String |
AbstractIdentifiedObject.getName() |
| "alias" | GenericName or CharSequence (optionally as array) |
AbstractIdentifiedObject.getAlias() |
| "identifiers" | ReferenceIdentifier (optionally as array) |
AbstractIdentifiedObject.getIdentifiers() |
| "remarks" | InternationalString or String |
AbstractIdentifiedObject.getRemarks() |
| "anchorPoint" | InternationalString or String |
AbstractDatum.getAnchorPoint() |
| "realizationEpoch" | Date |
AbstractDatum.getRealizationEpoch() |
| "domainOfValidity" | Extent |
AbstractDatum.getDomainOfValidity() |
| "scope" | InternationalString or String |
AbstractDatum.getScope() |
primeMeridian given to this constructor, or Greenwich. This restriction is for avoiding
ambiguity about whether the longitude rotation shall be applied before or after the datum shift.
If the target prime meridian is Greenwich, then the datum shift will be applied in a coordinate
system having Greenwich as the prime meridian.properties - the properties to be given to the identified object.ellipsoid - the ellipsoid.primeMeridian - the prime meridian.GeodeticObjectFactory.createGeodeticDatum(Map, Ellipsoid, PrimeMeridian)protected DefaultGeodeticDatum(GeodeticDatum datum)
This constructor performs a shallow copy, i.e. the properties are not cloned.
datum - the datum to copy.castOrCopy(GeodeticDatum)public static DefaultGeodeticDatum castOrCopy(GeodeticDatum object)
null, then this method returns null.
Otherwise if the given object is already a SIS implementation, then the given object is returned unchanged.
Otherwise a new SIS implementation is created and initialized to the attribute values of the given object.object - the object to get as a SIS implementation, or null if none.null if the argument was null.public Class<? extends GeodeticDatum> getInterface()
GeodeticDatum.class.
GeodeticDatum
sub-interface. Overriding possibility is left mostly for implementors who wish to extend GeoAPI with their
own set of interfaces.getInterface in class AbstractDatumGeodeticDatum.class or a user-defined sub-interface.public Ellipsoid getEllipsoid()
getEllipsoid in interface GeodeticDatumpublic PrimeMeridian getPrimeMeridian()
getPrimeMeridian in interface GeodeticDatumpublic BursaWolfParameters[] getBursaWolfParameters()
properties map at construction time.
See class javadoc for a discussion about Bursa-Wolf parameters.public Matrix getPositionVectorTransformation(GeodeticDatum targetDatum, Extent areaOfInterest)
If this datum and the given targetDatum do not use the same prime meridian,
then it is caller's responsibility to to apply longitude rotation before to use the matrix returned by this method.
The target prime meridian should be Greenwich (see constructor javadoc), in which case the datum shift should be applied in a geocentric coordinate system having
Greenwich as the prime meridian.
areaOfInterest is non-null and contains at least one geographic bounding box, then this
method ignores any Bursa-Wolf parameters having a domain
of validity that does not intersect the given geographic extent.
This method performs the search among the remaining parameters in the following order:
GeodeticDatum contains BursaWolfParameters having the given
target datum (ignoring metadata),
then the matrix will be built from those parameters.BursaWolfParameters having this datum
as their target (ignoring metadata), then the matrix will be built from those parameters
and inverted.BursaWolfParameters instance is found in any of the above steps, then the one having
the largest intersection between its domain of validity
and the given extent will be selected. If more than one instance have the same intersection, then the first
occurrence is selected.
targetDatum - the target datum.areaOfInterest - the geographic and temporal extent where the transformation should be valid, or null.this to target in geocentric space, or null if none.BursaWolfParameters.getPositionVectorTransformation(Date)public boolean isHeuristicMatchForName(String name)
true if either the primary name or at least
one alias matches the given string according heuristic rules.
This method implements the flexibility documented in the
super-class. In particular,
this method ignores the prime meridian name if that name is found between parenthesis in the datum name.
The meridian can be safely ignored in the datum name because the PrimeMeridian object is already
compared by the AbstractIdentifiedObject.equals(Object) method.
isHeuristicMatchForName in class AbstractDatumname - the name to compare.true if the primary name or at least one alias matches the specified name.IdentifiedObjects.isHeuristicMatchForName(IdentifiedObject, String),
Characters.Filter.LETTERS_AND_DIGITSpublic boolean equals(Object object, ComparisonMode mode)
equals in interface LenientComparableequals in class AbstractDatumobject - the object to compare to this.mode - STRICT for performing a strict comparison, or
IGNORE_METADATA for comparing only
properties relevant to coordinate transformations.true if both objects are equal.AbstractIdentifiedObject.computeHashCode(),
Utilities.deepEquals(Object, Object, ComparisonMode)protected long computeHashCode()
hashCode() for computing the hash code when first needed.
See AbstractIdentifiedObject.computeHashCode()
for more information.computeHashCode in class AbstractDatumprotected String formatTo(Formatter formatter)
Datum[…] element.
Datum["World Geodetic System 1984", Ellipsoid["WGS84", 6378137.0, 298.257223563, LengthUnit["metre", 1]], Id["EPSG", 6326, Citation["IOGP"], URI["urn:ogc:def:datum:EPSG::6326"]]]
Same datum using WKT 1.
DATUM["World Geodetic System 1984" SPHEROID["WGS84", 6378137.0, 298.257223563], AUTHORITY["EPSG", "6326"]]
formatTo in class AbstractDatumformatter - the formatter where to format the inner content of this WKT element."Datum" or "GeodeticDatum".Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.