Class DefaultGeodeticDatum
- All Implemented Interfaces:
- Serializable,- Formattable,- Deprecable,- LenientComparable,- Datum,- GeodeticDatum,- IdentifiedObject
Bursa-Wolf parameters
One or manyBursaWolfParameters 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:
- Fallback for datum shifts
 There is different methods for transforming coordinates from one geodetic datum to another datum, and Bursa-Wolf parameters are used with some of them. However, different set of parameters may exist for the same pair of (source, target) datum, so it is often not sufficient to know those datum. The (source, target) pair of CRS are often necessary, sometimes together with the geographic extent of the coordinates to transform.Apache SIS searches for datum shift methods (including Bursa-Wolf parameters) in the EPSG database when a CoordinateOperationor aMathTransformis 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 anyBursaWolfParametersinstance associated to thisDefaultGeodeticDatum. Only if no datum shift method is found in the database, then theBursaWolfParametersassociated to the datum may be used as a fallback.
- WKT version 1 formatting
 The Bursa-Wolf parameters association serves another purpose: when a CRS is formatted in the older Well Known Text (WKT 1) format, the formatted string may contain aTOWGS84[…]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 theTOWGS84element, except as a fallback for datum that do not exist in the EPSG database.
Creating new geodetic datum instances
New instances can be created either directly by specifying all information to a factory method (choices 3 and 4 below), or indirectly by specifying the identifier of an entry in a database (choices 1 and 2 below). Choice 1 in the following list is the easiest but most restrictive way to get a geodetic datum. The other choices provide more freedom.- Create a GeodeticDatumfrom one of the static convenience shortcuts listed inCommonCRS.datum().
- Create a GeodeticDatumfrom an identifier in a database by invokingDatumAuthorityFactory.createGeodeticDatum(String).
- Create a GeodeticDatumby invoking theDatumFactory.createGeodeticDatum(…)method (implemented for example byGeodeticObjectFactory).
- Create a DefaultGeodeticDatumby invoking the constructor.
GeodeticDatum datum = CommonCRS.WGS84.datum();
Immutability and thread safety
This class is immutable and thus thread-safe if the property values (not necessarily the map itself), theEllipsoid 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.- Since:
- 0.4
- See Also:
Defined in the sis-referencing module
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe"bursaWolf"property for Bursa-Wolf parameters.Fields inherited from class AbstractIdentifiedObjectDEPRECATED_KEY, LOCALE_KEYFields inherited from interface DatumANCHOR_POINT_KEY, DOMAIN_OF_VALIDITY_KEY, REALIZATION_EPOCH_KEY, SCOPE_KEYFields inherited from interface IdentifiedObjectALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
- 
Constructor SummaryConstructorsModifierConstructorDescriptionDefaultGeodeticDatum(Map<String, ?> properties, Ellipsoid ellipsoid, PrimeMeridian primeMeridian) Creates a geodetic datum from the given properties.protectedCreates a new datum with the same values than the specified one.
- 
Method SummaryModifier and TypeMethodDescriptionstatic DefaultGeodeticDatumcastOrCopy(GeodeticDatum object) Returns a SIS datum implementation with the same values than the given arbitrary implementation.protected longInvoked byhashCode()for computing the hash code when first needed.booleanequals(Object object, ComparisonMode mode) Compare this datum with the specified object for equality.protected StringFormats this datum as a Well Known TextDatum[…]element.Returns all Bursa-Wolf parameters specified in thepropertiesmap at construction time.Returns the ellipsoid given at construction time.Class<? extends GeodeticDatum>Returns the GeoAPI interface implemented by this class.getPositionVectorTransformation(GeodeticDatum targetDatum, Extent areaOfInterest) Returns the position vector transformation (geocentric domain) to the specified datum.Returns the prime meridian given at construction time.booleanReturnstrueif either the primary name or at least one alias matches the given string according heuristic rules.Methods inherited from class AbstractDatumcastOrCopy, getAnchorPoint, getDomainOfValidity, getRealizationEpoch, getScopeMethods inherited from class AbstractIdentifiedObjectcastOrCopy, equals, formatTo, getAlias, getDescription, getIdentifiers, getName, getRemarks, hashCode, isDeprecatedMethods inherited from class FormattableObjectprint, toString, toString, toWKTMethods inherited from class Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface DatumgetAnchorPoint, getDomainOfValidity, getRealizationEpoch, getScopeMethods inherited from interface IdentifiedObjectgetAlias, getIdentifiers, getName, getRemarks, toWKT
- 
Field Details- 
BURSA_WOLF_KEYThe"bursaWolf"property for Bursa-Wolf parameters.- See Also:
 
 
- 
- 
Constructor Details- 
DefaultGeodeticDatumpublic DefaultGeodeticDatum(Map<String, ?> properties, Ellipsoid ellipsoid, PrimeMeridian primeMeridian) Creates a geodetic datum from the given properties. The properties map is given unchanged to the super-class constructor. In addition to the properties documented in the parent constructor, the following properties are understood by this constructor:
 If Bursa-Wolf parameters are specified, then the prime meridian of their target datum shall be either the same than theRecognized properties (non exhaustive list) Property name Value type Returned by "bursaWolf" BursaWolfParameters(optionally as array)getBursaWolfParameters()Defined in parent classes (reminder) "name" ReferenceIdentifierorStringAbstractIdentifiedObject.getName()"alias" GenericNameorCharSequence(optionally as array)AbstractIdentifiedObject.getAlias()"identifiers" ReferenceIdentifier(optionally as array)AbstractIdentifiedObject.getIdentifiers()"remarks" InternationalStringorStringAbstractIdentifiedObject.getRemarks()"anchorPoint" InternationalStringorStringAbstractDatum.getAnchorPoint()"realizationEpoch" DateAbstractDatum.getRealizationEpoch()"domainOfValidity" ExtentAbstractDatum.getDomainOfValidity()"scope" InternationalStringorStringAbstractDatum.getScope()primeMeridiangiven 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.- Parameters:
- properties- the properties to be given to the identified object.
- ellipsoid- the ellipsoid.
- primeMeridian- the prime meridian.
- See Also:
 
- 
DefaultGeodeticDatumCreates a new datum with the same values than the specified one. This copy constructor provides a way to convert an arbitrary implementation into a SIS 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. - Parameters:
- datum- the datum to copy.
- See Also:
 
 
- 
- 
Method Details- 
castOrCopyReturns a SIS datum implementation with the same values than the given arbitrary implementation. If the given object isnull, then this method returnsnull. 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.- Parameters:
- object- the object to get as a SIS implementation, or- nullif none.
- Returns:
- a SIS implementation containing the values of the given object (may be the
         given object itself), or nullif the argument was null.
 
- 
getInterfaceReturns the GeoAPI interface implemented by this class. The SIS implementation returnsGeodeticDatum.class.Note for implementers: Subclasses usually do not need to override this method since GeoAPI does not defineGeodeticDatumsub-interface. Overriding possibility is left mostly for implementers who wish to extend GeoAPI with their own set of interfaces.- Overrides:
- getInterfacein class- AbstractDatum
- Returns:
- GeodeticDatum.classor a user-defined sub-interface.
 
- 
getEllipsoidReturns the ellipsoid given at construction time.- Specified by:
- getEllipsoidin interface- GeodeticDatum
- Returns:
- the ellipsoid.
 
- 
getPrimeMeridianReturns the prime meridian given at construction time.- Specified by:
- getPrimeMeridianin interface- GeodeticDatum
- Returns:
- the prime meridian.
 
- 
getBursaWolfParametersReturns all Bursa-Wolf parameters specified in thepropertiesmap at construction time. See class javadoc for a discussion about Bursa-Wolf parameters.- Returns:
- the Bursa-Wolf parameters, or an empty array if none.
 
- 
getPositionVectorTransformationReturns the position vector transformation (geocentric domain) to the specified datum. If the returned matrix is non-null, then the transformation is represented by an affine transform which can be applied on geocentric coordinates. This is identified in the EPSG database as operation method 1033 – Position Vector transformation (geocentric domain), or 1053 – Time-dependent Position Vector transformation.If this datum and the given targetDatumdo not use the same prime meridian, then it is caller's responsibility 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.Note: in EPSG dataset version 8.9, all datum shifts that can be represented by this method use Greenwich as the prime meridian, both in source and target datum.Search criteriaIf the givenareaOfInterestis 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:- If this GeodeticDatumcontainsBursaWolfParametershaving the given target datum (ignoring metadata), then the matrix will be built from those parameters.
- Otherwise if the other datum contains BursaWolfParametershaving this datum as their target (ignoring metadata), then the matrix will be built from those parameters and inverted.
 Multi-occurrences resolutionIf more than oneBursaWolfParametersinstance 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.Time-dependent parametersIf the given extent contains a temporal extent, then the instant located midway between start and end time will be taken as the date where to evaluate the Bursa-Wolf parameters. This is relevant only to time-dependent parameters.- Parameters:
- targetDatum- the target datum.
- areaOfInterest- the geographic and temporal extent where the transformation should be valid, or- null.
- Returns:
- an affine transform from thistotargetin geocentric space, ornullif none.
- See Also:
 
- If this 
- 
isHeuristicMatchForNameReturnstrueif 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 thePrimeMeridianobject is already compared by theAbstractIdentifiedObject.equals(Object)method.Example: if the datum name is "Nouvelle Triangulation Française (Paris)" and the prime meridian name is "Paris", then this method compares only the "Nouvelle Triangulation Française" part.Future evolutionsThis method implements heuristic rules learned from experience while trying to provide inter-operability with different data producers. Those rules may be adjusted in any future SIS version according experience gained while working with more data producers.- Overrides:
- isHeuristicMatchForNamein class- AbstractDatum
- Parameters:
- name- the name to compare.
- Returns:
- trueif the primary name or at least one alias matches the specified- name.
- Since:
- 0.7
- See Also:
 
- 
equalsCompare this datum with the specified object for equality.- Specified by:
- equalsin interface- LenientComparable
- Overrides:
- equalsin class- AbstractDatum
- Parameters:
- object- the object to compare to- this.
- mode-- STRICTfor performing a strict comparison, or- IGNORE_METADATAfor comparing only properties relevant to coordinate transformations.
- Returns:
- trueif both objects are equal.
- See Also:
 
- 
computeHashCodeprotected long computeHashCode()Invoked byhashCode()for computing the hash code when first needed. SeeAbstractIdentifiedObject.computeHashCode()for more information.- Overrides:
- computeHashCodein class- AbstractDatum
- Returns:
- the hash code value. This value may change in any future Apache SIS version.
 
- 
formatToFormats this datum as a Well Known TextDatum[…]element.Example: Well-Known Text of a WGS 84 datum.Note that the prime meridian shall be formatted by the caller as a separated element after the geodetic datum (for compatibility with WKT 1).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"]] - Overrides:
- formatToin class- AbstractDatum
- Parameters:
- formatter- the formatter where to format the inner content of this WKT element.
- Returns:
- "Datum"or- "GeodeticDatum".
- See Also:
 
 
-