Codota Logo
BursaWolfParameters.setValues
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
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

  • Finding current android device location
  • setRequestProperty (URLConnection)
  • findViewById (Activity)
  • getSystemService (Context)
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • JTextField (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now