[Schmitzm-commits] r31 - trunk/src/schmitzm/geotools/grid
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Mar 25 17:08:22 CET 2009
Author: mojays
Date: 2009-03-25 17:08:22 +0100 (Wed, 25 Mar 2009)
New Revision: 31
Modified:
trunk/src/schmitzm/geotools/grid/ReadableGridCoverage.java
Log:
Modified: trunk/src/schmitzm/geotools/grid/ReadableGridCoverage.java
===================================================================
--- trunk/src/schmitzm/geotools/grid/ReadableGridCoverage.java 2009-03-20 14:41:42 UTC (rev 30)
+++ trunk/src/schmitzm/geotools/grid/ReadableGridCoverage.java 2009-03-25 16:08:22 UTC (rev 31)
@@ -212,15 +212,17 @@
// linken oberen Ecke. Im Grid soll es genauso sein!
int x = cell[0];
int y = cell[1];
+ Object value = null;
switch ( getSampleType() ) {
case DataBuffer.TYPE_BYTE:
case DataBuffer.TYPE_SHORT:
case DataBuffer.TYPE_USHORT:
- case DataBuffer.TYPE_INT: return raster.getSample(x,y,band);
- case DataBuffer.TYPE_FLOAT: return raster.getSampleFloat(x,y,band);
- case DataBuffer.TYPE_DOUBLE: return raster.getSampleDouble(x,y,band);
+ case DataBuffer.TYPE_INT: value = raster.getSample(x,y,band); break;
+ case DataBuffer.TYPE_FLOAT: value = raster.getSampleFloat(x,y,band); break;
+ case DataBuffer.TYPE_DOUBLE: value = raster.getSampleDouble(x,y,band); break;
+ default: value = raster.getSample(x,y,band); break;
}
- return raster.getSample(x,y,band);
+ return value;
}
/**
More information about the Schmitzm-commits
mailing list