/** * Get the rasters, read if needed * * @return rasters */ public Rasters getRasters() { if (rasters == null) { readPixels(); } return rasters; }
/** * Get the rasters, read if needed * * @return rasters */ public Rasters getRasters() { if (rasters == null) { readPixels(); } return rasters; }
/** * Get the pixel at the coordinate * * @param x x coordinate * @param y y coordinate * @return pixel value */ public float getPixel(int x, int y) { float pixel = -1; if (rasters == null) { readPixels(); } if (rasters != null) { pixel = rasters.getFirstPixelSample(x, y).floatValue(); } else { throw new GeoPackageException("Could not retrieve pixel value"); } return pixel; }
/** * Get the pixel at the coordinate * * @param x * x coordinate * @param y * y coordinate * @return pixel value */ public float getPixel(int x, int y) { float pixel = -1; if (rasters == null) { readPixels(); } if (rasters != null) { pixel = rasters.getFirstPixelSample(x, y).floatValue(); } else { throw new GeoPackageException("Could not retrieve pixel value"); } return pixel; }