Dear All,
I am trying to obtain a minimum value from an ASCII Grid. Unfortunately I am
getting a nodata value instead.
I tried 2 ways:
- category.get(1).getRange().getMinimum(), and
- gridcoverage.getProperty("minimum") (based on Extrema operation)
both methods return -9999.0 (which is nodata value) but the real min value
is about 700
The complete code I used:
File file = new File("raster.asc");
ArcGridReader reader = new ArcGridReader(file);
gc = (GridCoverage2D) reader.read(null);
System.out.println("min VALUE: "
+gc.getSampleDimension(0).getCategories().get(1).getRange().getMinimum());
op= new OperationJAI("Extrema");
ParameterValueGroup params = op.getParameters();
params.parameter("Source").setValue(gc);
gc=(GridCoverage2D)op.doOperation(params,null);
System.out.println("Grid Minimum
"+((double[])gc.getProperty("minimum"))[0]);
Thank you very much in advance,
Oleg
--
View this message in context:
http://www.nabble.com/ASCII-Grid-min-value-tp19388244p19388244.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users