Class BursaWolfParameters
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
TimeDependentBWP
DefaultGeodeticDatum
class javadoc.
The Bursa-Wolf parameters shall be applied to geocentric coordinates, where the X axis points towards the Prime Meridian (usually Greenwich), the Y axis points East, and the Z axis points North.
Code | Name | Abbr. | Legacy |
---|---|---|---|
8605 | X-axis translation | tX | dx |
8606 | Y-axis translation | tY | dy |
8607 | Z-axis translation | tZ | dz |
8608 | X-axis rotation | rX | ex |
8609 | Y-axis rotation | rY | ey |
8610 | Z-axis rotation | rZ | ez |
8611 | Scale difference | dS | ppm |
Geocentric coordinates transformation
from (Xs, Ys, Zs)
to (Xt, Yt, Zt)
(ignoring unit conversions)
BursaWolfParameters
class use the EPSG abbreviations
with 4 additional constraints compared to the EPSG definitions:
- Unit of scale difference (
dS
) is fixed to parts per million. - Unit of translation terms (
tX
,tY
,tZ
) is fixed to metres. - Unit of rotation terms (
rX
,rY
,rZ
) is fixed to arc-seconds. - Sign of rotation terms is fixed to the Position Vector convention (EPSG operation method 9606). This is the opposite sign than the Coordinate Frame Rotation (EPSG operation method 9607). The Position Vector convention is used by IAG and recommended by ISO 19111.
Source and target geodetic datum
The source datum in above coordinates transformation is theDefaultGeodeticDatum
instance
that contain this BursaWolfParameters
. It can be any datum, including datum that are valid only locally.
The target datum is specified at construction time and is often,
but not necessarily, the World Geodetic System 1984 (WGS 84) datum.
If the source and target datum does not have the same prime meridian, then it is user's responsibility to apply longitude rotation before to use the Bursa-Wolf parameters.
When Bursa-Wolf parameters are used
BursaWolfParameters
are used in three contexts:
- Created as a step while creating a coordinate operation from the EPSG database.
- Associated to a
DefaultGeodeticDatum
with the WGS 84 target datum for providing the parameter values to display in theTOWGS84[…]
element of Well Known Text (WKT) version 1. Note that WKT version 2 does not haveTOWGS84[…]
element anymore. - Specified at
DefaultGeodeticDatum
construction time for arbitrary target datum. Apache SIS will ignore those Bursa-Wolf parameters, except as a fallback if no parameters can be found in the EPSG database for a given pair of source and target CRS.
- Since:
- 0.4
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptiondouble
The scale difference in parts per million (EPSG:8611).double
X-axis rotation in arc-seconds (EPSG:8608), sign following the Position Vector convention.double
Y-axis rotation in arc-seconds (EPSG:8609), sign following the Position Vector convention.double
Z-axis rotation in arc-seconds (EPSG:8610), sign following the Position Vector convention.double
X-axis translation in metres (EPSG:8605).double
Y-axis translation in metres (EPSG:8606).double
Z-axis translation in metres (EPSG:8607). -
Constructor Summary
ConstructorDescriptionBursaWolfParameters
(GeodeticDatum targetDatum, Extent domainOfValidity) Creates a new instance for the given target datum and domain of validity. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a copy of this object.boolean
Compares the specified object with this object for equality.protected String
Formats this object as a Well Known TextToWGS84[…]
element.Returns the region or timeframe in which a coordinate transformation based on those Bursa-Wolf parameters is valid, ornull
if unspecified.Returns the position vector transformation (geocentric domain) as an affine transform.Returns the target datum for this set of parameters, ornull
if unknown.double[]
Returns the parameter values.int
Returns a hash value for this object.void
invert()
Inverts in-place the transformation by inverting the sign of all numerical parameters.boolean
Returnstrue
if a transformation built from this set of parameters would perform no operation.boolean
Returnstrue
if a transformation built from this set of parameters would perform only a translation.void
void
setPositionVectorTransformation
(Matrix matrix, double tolerance) Sets all Bursa-Wolf parameters from the given Position Vector transformation matrix.void
setValues
(double... elements) Sets the parameters to the given values.Methods inherited from class FormattableObject
print, toString, toString, toWKT
-
Field Details
-
tX
public double tXX-axis translation in metres (EPSG:8605). The legacy OGC parameter name is"dx"
. -
tY
public double tYY-axis translation in metres (EPSG:8606). The legacy OGC parameter name is"dy"
. -
tZ
public double tZZ-axis translation in metres (EPSG:8607). The legacy OGC parameter name is"dz"
. -
rX
public double rXX-axis rotation in arc-seconds (EPSG:8608), sign following the Position Vector convention. The legacy OGC parameter name is"ex"
. -
rY
public double rYY-axis rotation in arc-seconds (EPSG:8609), sign following the Position Vector convention. The legacy OGC parameter name is"ey"
. -
rZ
public double rZZ-axis rotation in arc-seconds (EPSG:8610), sign following the Position Vector convention. The legacy OGC parameter name is"ez"
. -
dS
public double dSThe scale difference in parts per million (EPSG:8611). The legacy OGC parameter name is"ppm"
.Example
If a distance of 100 km in the source coordinate reference system translates into a distance of 100.001 km in the target coordinate reference system, the scale difference is 1 ppm (the ratio being 1.000001).
-
-
Constructor Details
-
BursaWolfParameters
Creates a new instance for the given target datum and domain of validity. All numerical parameters are initialized to 0, which correspond to an identity transform. Callers can assign numerical values to the public fields of interest after construction. For example, many coordinate transformations will provide values only for the translation terms (tX
,tY
,tZ
).Alternatively, numerical fields can also be initialized by a call to
setPositionVectorTransformation(Matrix, double)
.- Parameters:
targetDatum
- the target datum (usually WGS 84) for this set of parameters, ornull
if unknown.domainOfValidity
- area or region in which a coordinate transformation based on those Bursa-Wolf parameters is valid, ornull
if unspecified.
-
-
Method Details
-
getTargetDatum
Returns the target datum for this set of parameters, ornull
if unknown. This is usually the WGS 84 datum, but other targets are allowed.The source datum is the
DefaultGeodeticDatum
that contain thisBursaWolfParameters
instance.- Returns:
- the target datum for this set of parameters, or
null
if unknown.
-
getValues
public double[] getValues()Returns the parameter values. The length of the returned array depends on the values:- If this instance is an
TimeDependentBWP
, then the array length will be 14. - Otherwise if this instance contains a non-zero
dS
value, then the array length will be 7 withtX
,tY
,tZ
,rX
,rY
,rZ
anddS
values in that order. - Otherwise if this instance contains non-zero rotation terms, then this method returns the first 6 of the above-cited values.
- Otherwise (i.e. this instance is a translation), this method returns only the first 3 of the above-cited values.
Compatibility note
The rules about the arrays of length 3, 6 or 7 are derived from the Well Known Text (WKT) version 1 specification. The rule about the array of length 14 is an extension.- Returns:
- the parameter values as an array of length 3, 6, 7 or 14.
- Since:
- 0.6
- If this instance is an
-
setValues
public void setValues(double... elements) Sets the parameters to the given values. The given array can have any length. The first array elements will be assigned to thetX
,tY
,tZ
,rX
,rY
,rZ
anddS
fields in that order.- If the length of the given array is not sufficient for assigning a value to every fields,
then the remaining fields are left unchanged (they are not reset to zero,
but this is not a problem if this
BursaWolfParameters
is a new instance). - If the length of the given array is greater than necessary, then extra elements are ignored by this base
class. Note however that those extra elements may be used by subclasses like
TimeDependentBWP
.
- Parameters:
elements
- the new parameter values, as an array of any length.- Since:
- 0.6
- If the length of the given array is not sufficient for assigning a value to every fields,
then the remaining fields are left unchanged (they are not reset to zero,
but this is not a problem if this
-
isIdentity
public boolean isIdentity()Returnstrue
if a transformation built from this set of parameters would perform no operation. This is true when the value of all parameters is zero.- Returns:
true
if the parameters describe no operation.
-
isTranslation
public boolean isTranslation()Returnstrue
if a transformation built from this set of parameters would perform only a translation.- Returns:
true
if the parameters describe a translation only.
-
reverseRotation
public void reverseRotation()Inverts in-place the sign of rotation terms (rX
,rY
,rZ
). This method can be invoked for converting a Coordinate Frame Rotation transformation (EPSG operation method 9607) to a Position Vector transformation (EPSG operation method 9606). The latter convention is used by IAG and recommended by ISO 19111. -
invert
public void invert()Inverts in-place the transformation by inverting the sign of all numerical parameters. The position vector transformation matrix created from inverted Bursa-Wolf parameters will be approximately equals to the inverse of the matrix created from the original parameters. The equality holds approximately only because the parameter values are very small (parts per millions and arc-seconds). -
getPositionVectorTransformation
Returns the position vector transformation (geocentric domain) as an affine transform. For transformations that do not depend on time, the formula is as below whereR
is a conversion factor from arc-seconds to radians:
This affine transform can be applied on geocentric coordinates. This is identified as operation method 1033 in the EPSG database. Those geocentric coordinates are typically converted from geographic coordinates in the region or timeframe given byR = toRadians(1″) S = 1 + dS/1000000 ┌ ┐ ┌ ┐ ┌ ┐ │ X' │ │ S -rZ*RS +rY*RS tX │ │ X │ │ Y' │ = │ +rZ*RS S -rX*RS tY │ │ Y │ │ Z' │ │ -rY*RS +rX*RS S tZ │ │ Z │ │ 1 │ │ 0 0 0 1 │ │ 1 │ └ ┘ └ ┘ └ ┘
getDomainOfValidity()
.If the source datum and the target datum do 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.
Time-dependent transformation
Some transformations use parameters that vary with time (e.g. operation method EPSG:1053). Users can optionally specify a date for which the transformation is desired. For transformations that do not depends on time, this date is ignored and can be null. For time-dependent transformations,null
values default to the transformation's reference time.Inverse transformation
The inverse transformation can be approximated by reversing the sign of the 7 parameters before to use them in the above matrix. This is often considered sufficient since position vector transformations are themselves approximations. However, Apache SIS will rather useMatrixSIS.inverse()
in order to increase the chances that concatenation of transformations A → B followed by B → A gives back the identity transform.- Parameters:
time
- date for which the transformation is desired, ornull
for the transformation's reference time.- Returns:
- an affine transform in geocentric space created from this Bursa-Wolf parameters and the given time.
- See Also:
-
setPositionVectorTransformation
public void setPositionVectorTransformation(Matrix matrix, double tolerance) throws IllegalArgumentException Sets all Bursa-Wolf parameters from the given Position Vector transformation matrix. The matrix shall comply to the following constraints:- The matrix shall be affine.
- The sub-matrix defined by
matrix
without the last row and last column shall be skew-symmetric (a.k.a. antisymmetric).
- Parameters:
matrix
- the matrix from which to get Bursa-Wolf parameters.tolerance
- the tolerance error for the skew-symmetric matrix test, in units of PPM or arc-seconds (e.g. 1E-8).- Throws:
IllegalArgumentException
- if the specified matrix does not met the conditions.- See Also:
-
getDomainOfValidity
Returns the region or timeframe in which a coordinate transformation based on those Bursa-Wolf parameters is valid, ornull
if unspecified. If an extent was specified at construction time, then that extent is returned. Otherwise the datum domain of validity (which may benull
) is returned.- Returns:
- area or region or timeframe in which the coordinate transformation is valid, or
null
. - See Also:
-
clone
Returns a copy of this object. -
equals
Compares the specified object with this object for equality. -
hashCode
public int hashCode()Returns a hash value for this object. -
formatTo
Formats this object as a Well Known TextToWGS84[…]
element. The WKT contains the parameters in translation, rotation, scale order, like below:
The element name isTOWGS84[tX, tY, tZ, rX, rY, rZ, dS]
"ToWGS84"
in the common case where the target datum is WGS 84. For other targets, the element name will be derived from the datum name.Compatibility note
TOWGS84
is defined in the WKT 1 specification only.- Specified by:
formatTo
in classFormattableObject
- Parameters:
formatter
- The formatter where to format the inner content of this WKT element.- Returns:
- Usually
"ToWGS84"
. - See Also:
-