Examples of PiecewiseTransform1DElement


Examples of org.geotools.referencing.piecewise.PiecewiseTransform1DElement

    // in this case we would get erroneous results given to the fact that we
    // might be reusing a valid sample category while we should be using a
    // no data one.
    //
    // ////////////////////////////////////////////////////////////////////
    PiecewiseTransform1DElement last = null;
    final boolean useLast = pieces instanceof DefaultDomain1D;
    do {
      try {
        iterator.startLines();
        if (!iterator.finishedLines())
          do {
            iterator.startPixels();
            if (!iterator.finishedPixels())
              do {
                // //
                //
                // get the input value to be transformed
                //
                // //
                final double value = iterator.getSampleDouble();
                // //
                //
                // get the correct category for this
                // transformation
                //
                // //
                final PiecewiseTransform1DElement transform;
                if (useLast) {
                  if (last != null && last.contains(value))
                    transform = last;
                  else {
                    last = transform = pieces.findDomainElement(value);
                  }
                } else
                  transform = (PiecewiseTransform1DElement) pieces.findDomainElement(value);

                // //
                //
                // in case everything went fine let's apply the
                // transform.
                //
                // //
                if (transform != null)
                  iterator.setSample(transform.transform(value));
                else {
                  // //
                  //
                  // if we did not find one let's try to use
                  // one of the nodata ones to fill the gaps,
View Full Code Here

Examples of org.geotools.referencing.piecewise.PiecewiseTransform1DElement

    throw new UnsupportedOperationException(Errors.format(ErrorKeys.UNSUPPORTED_OPERATION_$1, "derivate"));
  }

  public double transform(double value) throws TransformException {
    initColorModel();
    PiecewiseTransform1DElement transform=(PiecewiseTransform1DElement) findDomainElement(value);
    if(transform!=null)
      return transform.transform(value);
    return this.preFilteringPiecewise.transform(value);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.