/** * Determine the x source pixel location * * @param x * x pixel * @param destLeft * destination left most pixel * @param srcLeft * source left most pixel * @param widthRatio * source over destination width ratio * @return x source pixel */ protected float getXSource(int x, float destLeft, float srcLeft, float widthRatio) { float dest = getXEncodedLocation(x, encoding); float source = getSource(dest, destLeft, srcLeft, widthRatio); return source; }
/** * Get the min, max, and offset of the source X pixel * * @param source * source x pixel * @return source x pixel information */ protected CoverageDataSourcePixel getXSourceMinAndMax(float source) { int floor = (int) Math.floor(source); float valueLocation = getXEncodedLocation(floor, griddedCoverage.getGridCellEncodingType()); CoverageDataSourcePixel pixel = getSourceMinAndMax(source, floor, valueLocation); return pixel; }