Class Isolines
java.lang.Object
org.apache.sis.internal.processing.isoline.Isolines
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 Summary
Modifier and TypeMethodDescriptionstatic Isolines[]generate(RenderedImage data, double[][] levels, org.opengis.referencing.operation.MathTransform gridToCRS) Generates isolines at the specified levels computed from data provided by the given image.parallelGenerate(RenderedImage data, double[][] levels, org.opengis.referencing.operation.MathTransform gridToCRS) Generates isolines in background using an arbitrary number of processors.final NavigableMap<Double, Shape> Returns the polylines for each level specified to thegenerate(…)method.static List<NavigableMap<Double, Shape>> Returns deferred isolines for each band, then for each values in the band.static List<NavigableMap<Double, Shape>> Returns the isolines for each band, then for each values in the band.
-
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 thanlevels.length, the last array is reused for all remaining bands.gridToCRS- transform from pixel coordinates to geometry coordinates, ornullif 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 theFutureobject.- 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 thanlevels.length, the last array is reused for all remaining bands.gridToCRS- transform from pixel coordinates to geometry coordinates, ornullif none. Integer source coordinates are located at pixel centers.- Returns:
- a
Futurerepresenting pending completion of isoline computation.
-
polylines
Returns the polylines for each level specified to thegenerate(…)method.- Returns:
- the polylines for each level.
-
toList
Returns the isolines for each band, then for each values in the band.- Parameters:
isolines- result ofgenerate(…)orparallelGenerate(…)method call.- Returns:
- isoline shapes for each values in each band.
-
toList
Returns deferred isolines for each band, then for each values in the band. TheFutureresult is requested the first time thatList.get(int)is invoked.- Parameters:
isolines- result ofgenerate(…)orparallelGenerate(…)method call.- Returns:
- isoline shapes for each values in each band.
-