Revision: 4546 http://sourceforge.net/p/jump-pilot/code/4546 Author: ma15569 Date: 2015-11-03 08:37:41 +0000 (Tue, 03 Nov 2015) Log Message: ----------- Giuseppe Aruta Nov. 2015 workaround for OpenJUMP bug 410 (Sextante), If nodata value is -3.40282346639E38 and min value -9999, -99999 or 1.70141E38. Those two values are displayed in red on DEMStatistic table
Modified Paths: -------------- core/trunk/src/org/openjump/core/ui/plugin/raster/statistics/DEMStatisticsPlugIn.java Modified: core/trunk/src/org/openjump/core/ui/plugin/raster/statistics/DEMStatisticsPlugIn.java =================================================================== --- core/trunk/src/org/openjump/core/ui/plugin/raster/statistics/DEMStatisticsPlugIn.java 2015-11-01 16:07:50 UTC (rev 4545) +++ core/trunk/src/org/openjump/core/ui/plugin/raster/statistics/DEMStatisticsPlugIn.java 2015-11-03 08:37:41 UTC (rev 4546) @@ -185,13 +185,47 @@ String miny = df.format(extent.getMinY()); int X = rstLayer.getNX(); // Number of columns int Y = rstLayer.getNY(); // Number of rows + + + /* + * Giuseppe Aruta Nov. 2015 + * workaround for OpenJUMP bug 410 (Sextante), If nodata value is -3.40282346639E38 + * and min value -9999, -99999 or 1.70141E38. Those two values are displayed in red + * on DEMStatistic table + */ String nodata = null; + String texmin = df.format(rstLayer.getMinValue()); double nda = slayer.getNoDataValue(); + String begin ="<b><font color='red'>"; + String end = "</font></b>"; + if (nda == -3.40282346639E38 || rstLayer.getNoDataValue() == -1.79769313486E308) { + if (rstLayer.getMinValue() == -9999 + || rstLayer.getMinValue() == -99999 + || rstLayer.getMinValue() == 1.70141E38){ + nodata = begin+nodata+end; + min = begin+texmin+end; + } else{ + nodata = Double.toString(nda); + min = texmin; + } + + } else{ + nodata = Double.toString(nda); + min = texmin; + + } + + + + /* + + + if (nda == -3.4028234e+038) { nodata = "<b><font color='red'>-3.4028234e+038</font></b>"; } else { nodata = Double.toString(nda); - } + }*/ int validcells = X * Y - nodata(context, rstLayer);// Number of // valid ------------------------------------------------------------------------------ _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel