java.lang.Object
org.apache.sis.internal.processing.isoline.Isolines

public final class Isolines extends Object
Creates isolines at specified levels from grid values provided in a RenderedImage. Isolines are created by calls to the generate(…) static method.
Since:
1.1
Version:
1.3
Author:
Johann Sorel (Geomatys), Martin Desruisseaux (Geomatys)
See Also:
  • Method Details

    • generate

      public static Isolines[] generate(RenderedImage data, double[][] levels, org.opengis.referencing.operation.MathTransform gridToCRS) throws org.opengis.referencing.operation.TransformException
      Generates isolines at the specified levels computed from data provided by the given image. Isolines will be created for every bands in the given image. This method performs all computation sequentially in current thread.
      Parameters:
      data - image providing source values.
      levels - values for which to compute isolines. An array should be provided for each band. If there is more bands than levels.length, the last array is reused for all remaining bands.
      gridToCRS - transform from pixel coordinates to geometry coordinates, or null if none. Integer source coordinates are located at pixel centers.
      Returns:
      the isolines for each band in the given image.
      Throws:
      org.opengis.referencing.operation.TransformException - if an interpolated point cannot be transformed using the given transform.
    • parallelGenerate

      public static Future<Isolines[]> parallelGenerate(RenderedImage data, double[][] levels, org.opengis.referencing.operation.MathTransform gridToCRS)
      Generates isolines in background using an arbitrary number of processors. This method returns immediately (i.e. the current thread is not used for isoline computation). The result will become available at a later time in the Future object.
      Parameters:
      data - image providing source values.
      levels - values for which to compute isolines. An array should be provided for each band. If there is more bands than levels.length, the last array is reused for all remaining bands.
      gridToCRS - transform from pixel coordinates to geometry coordinates, or null if none. Integer source coordinates are located at pixel centers.
      Returns:
      a Future representing pending completion of isoline computation.
    • polylines

      public final NavigableMap<Double,Shape> polylines()
      Returns the polylines for each level specified to the generate(…) method.
      Returns:
      the polylines for each level.
    • toList

      public static List<NavigableMap<Double,Shape>> toList(Isolines[] isolines)
      Returns the isolines for each band, then for each values in the band.
      Parameters:
      isolines - result of generate(…) or parallelGenerate(…) method call.
      Returns:
      isoline shapes for each values in each band.
    • toList

      public static List<NavigableMap<Double,Shape>> toList(Future<Isolines[]> isolines)
      Returns deferred isolines for each band, then for each values in the band. The Future result is requested the first time that List.get(int) is invoked.
      Parameters:
      isolines - result of generate(…) or parallelGenerate(…) method call.
      Returns:
      isoline shapes for each values in each band.