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

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

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

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

/**
 * Sets the parameters to the given values. The given array can have any length. The first array elements will be
 * assigned to the {@link #tX tX}, {@link #tY tY}, {@link #tZ tZ}, {@link #rX rX}, {@link #rY rY}, {@link #rZ rZ},
 * {@link #dS dS}, {@link #dtX}, {@link #dtY}, {@link #dtZ}, {@link #drX}, {@link #drY}, {@link #drZ} and
 * {@link #ddS} fields in that order.
 *
 * @param  elements  the new parameter values, as an array of any length.
 *
 * @since 0.6
 */
@Override
@SuppressWarnings("fallthrough")
public void setValues(final double... elements) {
  if (elements.length >= 8) {
    switch (elements.length) {
      default:  ddS = elements[13];  // Fallthrough everywhere.
      case 13:  drZ = elements[12];
      case 12:  drY = elements[11];
      case 11:  drX = elements[10];
      case 10:  dtZ = elements[ 9];
      case  9:  dtY = elements[ 8];
      case  8:  dtX = elements[ 7];
    }
  }
  super.setValues(elements);
}
origin: apache/sis

/**
 * Sets the parameters to the given values. The given array can have any length. The first array elements will be
 * assigned to the {@link #tX tX}, {@link #tY tY}, {@link #tZ tZ}, {@link #rX rX}, {@link #rY rY}, {@link #rZ rZ},
 * {@link #dS dS}, {@link #dtX}, {@link #dtY}, {@link #dtZ}, {@link #drX}, {@link #drY}, {@link #drZ} and
 * {@link #ddS} fields in that order.
 *
 * @param  elements  the new parameter values, as an array of any length.
 *
 * @since 0.6
 */
@Override
@SuppressWarnings("fallthrough")
public void setValues(final double... elements) {
  if (elements.length >= 8) {
    switch (elements.length) {
      default:  ddS = elements[13];  // Fallthrough everywhere.
      case 13:  drZ = elements[12];
      case 12:  drY = elements[11];
      case 11:  drX = elements[10];
      case 10:  dtZ = elements[ 9];
      case  9:  dtY = elements[ 8];
      case  8:  dtX = elements[ 7];
    }
  }
  super.setValues(elements);
}
origin: apache/sis

/**
 * Inverts in-place the transformation by inverting the sign of all numerical parameters.
 * The {@linkplain #getPositionVectorTransformation(Date) position vector transformation} matrix
 * created from inverted Bursa-Wolf parameters will be <strong>approximately</strong> equals
 * to the {@linkplain org.apache.sis.referencing.operation.matrix.MatrixSIS#inverse() 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).
 */
public void invert() {
  final double[] values = getValues();
  for (int i=0; i<values.length; i++) {
    values[i] = -values[i];
  }
  setValues(values);
}
origin: org.apache.sis.core/sis-referencing

/**
 * Inverts in-place the transformation by inverting the sign of all numerical parameters.
 * The {@linkplain #getPositionVectorTransformation(Date) position vector transformation} matrix
 * created from inverted Bursa-Wolf parameters will be <strong>approximatively</strong> equals
 * to the {@linkplain org.apache.sis.referencing.operation.matrix.MatrixSIS#inverse() inverse}
 * of the matrix created from the original parameters. The equality holds approximatively only
 * because the parameter values are very small (parts per millions and arc-seconds).
 */
public void invert() {
  final double[] values = getValues();
  for (int i=0; i<values.length; i++) {
    values[i] = -values[i];
  }
  setValues(values);
}
origin: org.apache.sis.core/sis-referencing

/**
 * Creates the {@code TOWGS84} element during parsing of a WKT version 1.
 *
 * @param  values  the 7 Bursa-Wolf parameter values.
 * @return the {@link BursaWolfParameters}.
 *
 * @since 0.6
 */
@Override
public Object createToWGS84(final double[] values) {
  final BursaWolfParameters info = new BursaWolfParameters(CommonCRS.WGS84.datum(), null);
  info.setValues(values);
  return info;
}
origin: apache/sis

/**
 * Creates the {@code TOWGS84} element during parsing of a WKT version 1.
 *
 * @param  values  the 7 Bursa-Wolf parameter values.
 * @return the {@link BursaWolfParameters}.
 *
 * @since 0.6
 */
@Override
public Object createToWGS84(final double[] values) {
  final BursaWolfParameters info = new BursaWolfParameters(CommonCRS.WGS84.datum(), null);
  info.setValues(values);
  return info;
}
origin: apache/sis

/**
 * Tests {@link BursaWolfParameters#setValues(double[])}.
 */
@Test
@DependsOnMethod("testGetValues")
public void testSetValues() {
  final BursaWolfParameters actual =  createWGS72_to_WGS84();
  final BursaWolfParameters expected = createED87_to_WGS84();
  final double[] values = expected.getValues();
  assertFalse("equals(Object) before to set the values.", actual.equals(expected));
  actual.setValues(values);
  assertArrayEquals("getValues() after setting the values.", values, actual.getValues(), STRICT);
  // Can not test assertEquals(expected, actual) because of different geographic extent.
}
org.apache.sis.referencing.datumBursaWolfParameterssetValues

Javadoc

Sets the parameters to the given values. The given array can have any length. The first array elements will be assigned to the #tX, #tY, #tZ, #rX, #rY, #rZ and #dSfields 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.

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
  • getPositionVectorTransformation
    Returns the position vector transformation (geocentric domain) as an affine transform. For transform
  • 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
  • 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

  • Reading from database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • findViewById (Activity)
  • getResourceAsStream (ClassLoader)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • JList (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • Best plugins for Eclipse
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