Tabnine Logo
BursaWolfParameters.getPositionVectorTransformation
Code IndexAdd Tabnine to your IDE (free)

How to use
getPositionVectorTransformation
method
in
org.apache.sis.referencing.datum.BursaWolfParameters

Best Java code snippets using org.apache.sis.referencing.datum.BursaWolfParameters.getPositionVectorTransformation (Showing top 6 results out of 315)

origin: org.apache.sis.core/sis-referencing

/**
 * Invokes {@link BursaWolfParameters#getPositionVectorTransformation(Date)} for a date calculated from
 * the temporal elements on the given extent.  This method chooses an instant located midway between the
 * start and end time.
 */
private static Matrix createTransformation(final BursaWolfParameters bursaWolf, final Extent areaOfInterest) {
  /*
   * Implementation note: we know that we do not need to compute an instant if the parameters is
   * not a subclass of BursaWolfParameters. This optimisation covers the vast majority of cases.
   */
  return bursaWolf.getPositionVectorTransformation(bursaWolf.getClass() != BursaWolfParameters.class ?
      Extents.getDate(areaOfInterest, 0.5) : null);       // 0.5 is for choosing midway instant.
}
origin: apache/sis

/**
 * Invokes {@link BursaWolfParameters#getPositionVectorTransformation(Date)} for a date calculated from
 * the temporal elements on the given extent.  This method chooses an instant located midway between the
 * start and end time.
 */
private static Matrix createTransformation(final BursaWolfParameters bursaWolf, final Extent areaOfInterest) {
  /*
   * Implementation note: we know that we do not need to compute an instant if the parameters is
   * not a subclass of BursaWolfParameters. This optimisation covers the vast majority of cases.
   */
  return bursaWolf.getPositionVectorTransformation(bursaWolf.getClass() != BursaWolfParameters.class ?
      Extents.getDate(areaOfInterest, 0.5) : null);       // 0.5 is for choosing midway instant.
}
origin: apache/sis

/**
 * Invokes {@link BursaWolfParameters#getPositionVectorTransformation(Date)}
 * and compares with our own matrix calculated using double arithmetic.
 */
private static MatrixSIS getPositionVectorTransformation(final BursaWolfParameters p) {
  final double   S = 1 + p.dS / BursaWolfParameters.PPM;
  final double  RS = TO_RADIANS * S;
  final Matrix4 expected = new Matrix4(
        S,  -p.rZ*RS,  +p.rY*RS,  p.tX,
    +p.rZ*RS,         S,  -p.rX*RS,  p.tY,
    -p.rY*RS,  +p.rX*RS,         S,  p.tZ,
        0,         0,         0,  1);
  final MatrixSIS matrix = MatrixSIS.castOrCopy(p.getPositionVectorTransformation(null));
  assertMatrixEquals("getPositionVectorTransformation", expected, matrix, p.isTranslation() ? 0 : 1E-14);
  return matrix;
}
origin: apache/sis

  parameters.reverseRotation();
return MathTransforms.linear(parameters.getPositionVectorTransformation(null));
origin: org.apache.sis.core/sis-referencing

  parameters.reverseRotation();
return MathTransforms.linear(parameters.getPositionVectorTransformation(null));
origin: apache/sis

/**
 * Tests the {@link BursaWolfParameters#setPositionVectorTransformation(Matrix, double)} method.
 * This is an internal consistency test.
 */
@Test
@DependsOnMethod("testGetPositionVectorTransformation")
public void testSetPositionVectorTransformation() {
  final BursaWolfParameters bursaWolf = createED87_to_WGS84();
  final Matrix matrix = bursaWolf.getPositionVectorTransformation(null);
  final BursaWolfParameters actual = new BursaWolfParameters(
      bursaWolf.getTargetDatum(), bursaWolf.getDomainOfValidity());
  actual.setPositionVectorTransformation(matrix, 1E-10);
  assertEquals(bursaWolf, actual);
}
org.apache.sis.referencing.datumBursaWolfParametersgetPositionVectorTransformation

Javadoc

Returns the position vector transformation (geocentric domain) as an affine transform. For transformations that do not depend on time, the formula is as below where Ris a conversion factor from arc-seconds to radians:
 R = 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 │ 
└    ┘    └                               ┘  └   ┘
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 by #getDomainOfValidity().

If the source datum and the #getTargetDatum() do not use the same DefaultGeodeticDatum#getPrimeMeridian(), 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 TimeDependentBWP#getTimeReference().
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 use org.apache.sis.referencing.operation.matrix.MatrixSIS#inverse() in order to increase the chances that concatenation of transformations A → B followed by B → A gives back the identity transform.

Popular methods of BursaWolfParameters

  • getTargetDatum
    Returns the target datum for this set of parameters, or null if unknown. This is usually the WGS 84
  • isIdentity
    Returns true if a transformation built from this set of parameters would perform no operation. This
  • isTranslation
    Returns true if a transformation built from this set of parameters would perform only a translation.
  • <init>
    Creates a new instance for the given target datum and domain of validity. All numerical parameters a
  • equals
    Compares the specified object with this object for equality.
  • getDomainOfValidity
    Returns the region or timeframe in which a coordinate transformation based on those Bursa-Wolf param
  • getValues
    Returns the parameter values. The length of the returned array depends on the values: * If this inst
  • setPositionVectorTransformation
    Sets all Bursa-Wolf parameters from the given Position Vector transformation matrix. The matrix sha
  • setValues
    Sets the parameters to the given values. The given array can have any length. The first array elemen
  • verify
    Verifies parameters validity after initialization of DefaultGeodeticDatum. This method requires that
  • clone
    Returns a copy of this object.
  • getNumber
    Retrieves the value at the specified row and column of the given matrix, wrapped in a Number. The Nu
  • clone,
  • getNumber,
  • hashCode,
  • invert,
  • isToWGS84,
  • param,
  • period,
  • reverseRotation,
  • toString

Popular in Java

  • Making http requests using okhttp
  • getSystemService (Context)
  • getApplicationContext (Context)
  • requestLocationUpdates (LocationManager)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now