Tabnine Logo
ProjectionException.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.sis.referencing.operation.projection.ProjectionException
constructor

Best Java code snippets using org.apache.sis.referencing.operation.projection.ProjectionException.<init> (Showing top 20 results out of 315)

origin: Geomatys/geotoolkit

/**
 * Iteratively solve equation (7-9) from Snyder. This is the converse of {@link #tsfn}.
 * The input should be a positive number, otherwise the result will be either outside
 * the [-π/2 ... π/2] range, or will be NaN. Its behavior at some particular points is:
 * <p>
 * <ul>
 *   <li>If {@code ts} is zero, then the result is close to π/2.</li>
 *   <li>If {@code ts} is 1, then the result is close to zero.</li>
 *   <li>If {@code ts} is positive infinity, then the result is close to -π/2.</li>
 * </ul>
 *
 * @param  ts The value returned by {@link #tsfn}.
 * @return The latitude in radians.
 * @throws ProjectionException if the iteration does not converge.
 */
final double cphi2(final double ts) throws ProjectionException {    // == φ(ts)
  final double he = 0.5 * eccentricity;
  double φ = (PI/2) - 2.0 * atan(ts);
  for (int i=0; i<MAXIMUM_ITERATIONS; i++) {
    final double con  = eccentricity * sin(φ);
    final double dphi = abs(φ - (φ = PI/2 - 2.0*atan(ts * pow((1-con)/(1+con), he))));
    if (dphi <= ITERATION_TOLERANCE) {
      return φ;
    }
  }
  if (isNaN(ts)) {
    return NaN;
  }
  throw new ProjectionException(Errors.format(Errors.Keys.NoConvergence));
}
origin: Geomatys/geotoolkit

throw new ProjectionException(Errors.format(Errors.Keys.NoConvergence));
origin: org.apache.sis.core/sis-referencing

throw new ProjectionException(Resources.format(Resources.Keys.NoConvergence));
origin: Geomatys/geotoolkit

  /**
   * Calculates the latitude ({@code φ}) from a meridian distance.
   * Determines φ to a tenth of {@value #ITERATION_TOLERANCE} radians.
   *
   * @param  delta meridian distance to calculate latitude for.
   * @return The latitude of the meridian distance.
   * @throws ProjectionException if the iteration does not converge.
   */
  final double inv_mlfn(final double delta) throws ProjectionException {
    final double k = 1/(1 - eccentricitySquared);
    double φ = delta;
    int i=MAXIMUM_ITERATIONS;
    do { // rarely goes over 5 iterations
      final double s = sin(φ);
      double t = 1 - eccentricitySquared * (s*s);
      t = (mlfn(φ, s, cos(φ)) - delta) * (t * sqrt(t)) * k;
      φ -= t;
      if (abs(t) < ITERATION_TOLERANCE/10) {
        return φ;
      }
    } while (--i >= 0);
    throw new ProjectionException(Errors.format(Errors.Keys.NoConvergence));
  }
}
origin: apache/sis

throw new ProjectionException(Resources.format(Resources.Keys.NoConvergence));
origin: Geomatys/geotoolkit

throw new ProjectionException(Errors.format(Errors.Keys.TestFailure_3, variable,
origin: Geomatys/geotoolkit

throw new ProjectionException(Errors.format(Errors.Keys.NoConvergence));
origin: Geomatys/geotoolkit

do {
  if (--i < 0) {
    throw new ProjectionException(Errors.format(Errors.Keys.NoConvergence));
origin: org.apache.sis.core/sis-referencing

if (abs(λ) > PI/2) {
  throw new ProjectionException(Errors.format(Errors.Keys.OutsideDomainOfValidity));
origin: apache/sis

do {
  if (--nbIte < 0) {
    throw new ProjectionException(Resources.format(Resources.Keys.NoConvergence));
throw new ProjectionException(e);
origin: Geomatys/geotoolkit

do {
  if (--i < 0) {
    throw new ProjectionException(Errors.format(Errors.Keys.NoConvergence));
origin: Geomatys/geotoolkit

if (sinc > 1) {
  if (sinc - 1 > ANGLE_TOLERANCE) {
    throw new ProjectionException(Errors.format(Errors.Keys.PointOutsideHemisphere));
origin: apache/sis

throw new ProjectionException(Resources.format(Resources.Keys.NoConvergence));
origin: apache/sis

if (abs(λ) > PI/2) {
  throw new ProjectionException(Errors.format(Errors.Keys.OutsideDomainOfValidity));
origin: Geomatys/geotoolkit

throw new ProjectionException(Errors.format(Errors.Keys.PointOutsideHemisphere));
origin: org.apache.sis.core/sis-referencing

throw new ProjectionException(Resources.format(Resources.Keys.NoConvergence));
origin: apache/sis

/**
 * Computes φ using the iterative method used by USGS.
 * This is the second part of the {@link ConformalProjection#φ(double)} method.
 *
 * @param  t  the {@code expOfSouthing} parameter value.
 * @return the latitude (in radians) for the given parameter.
 * @throws ProjectionException if the iteration does not converge.
 */
public double byIterativeMethod(final double t) throws ProjectionException {
  final double hℯ = 0.5 * eccentricity;
  double φ = (PI/2) - 2*atan(t);                                          // Snyder (7-11)
  for (int it=0; it < NormalizedProjection.MAXIMUM_ITERATIONS; it++) {    // Iteratively solve equation (7-9) from Snyder
    final double ℯsinφ = eccentricity * sin(φ);
    final double Δφ = φ - (φ = PI/2 - 2*atan(t * pow((1 - ℯsinφ)/(1 + ℯsinφ), hℯ)));
    if (abs(Δφ) <= NormalizedProjection.ITERATION_TOLERANCE) {
      return φ;
    }
  }
  if (Double.isNaN(t)) {
    return Double.NaN;
  }
  throw new ProjectionException(Resources.format(Resources.Keys.NoConvergence));
}
origin: Geomatys/geotoolkit

throw new ProjectionException(c[i].x + " outside of (" + x.getMinimumValue() + "," + x.getMaximumValue() + ")");
throw new ProjectionException(c[i].y + " outside of (" + y.getMinimumValue() + "," + y.getMaximumValue() + ")");
origin: org.apache.sis.core/sis-referencing

throw new ProjectionException(Resources.format(Resources.Keys.NoConvergence));
origin: Geomatys/geotoolkit

throw new ProjectionException(Errors.format(Errors.Keys.CantComputeDerivative));
org.apache.sis.referencing.operation.projectionProjectionException<init>

Javadoc

Constructs a new exception with no detail message.

Popular methods of ProjectionException

    Popular in Java

    • Parsing JSON documents to java classes using gson
    • onCreateOptionsMenu (Activity)
    • getResourceAsStream (ClassLoader)
    • getContentResolver (Context)
    • ByteBuffer (java.nio)
      A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
    • Selector (java.nio.channels)
      A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
    • Date (java.sql)
      A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
    • NumberFormat (java.text)
      The abstract base class for all number formats. This class provides the interface for formatting and
    • ResourceBundle (java.util)
      ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
    • FileUtils (org.apache.commons.io)
      General file manipulation utilities. Facilities are provided in the following areas: * writing to a
    • From CI to AI: The AI layer in your organization
    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