MathTransform tr = CRS.findMathTransform(crs, DefaultGeographicCRS.WGS84); GridCoordinates2D coord = new GridCoordinates2D(); int i = 0, ns = 0; for (int gy = 0; gy < height; gy++) {
/** * Returns the valid minimum inclusive grid coordinate along the specified dimension. * * @see #getLow() */ public int getLow(final int dimension) { switch (dimension) { case 0: return x; case 1: return y; default: throw new IndexOutOfBoundsException(GridCoordinates2D.indexOutOfBounds(dimension)); } }
public GridCoverage2D execute(GridCoverage2D inputGc) { this.initSurface(inputGc); DiskMemImage outputImage = this.createDiskMemImage(inputGc, RasterPixelType.FLOAT); WritableRectIter writer = RectIterFactory.createWritable(outputImage, outputImage.getBounds()); GridCoordinates2D pos = new GridCoordinates2D(); int y = bounds.y; writer.startLines(); while (!writer.finishedLines()) { int x = bounds.x; writer.startPixels(); while (!writer.finishedPixels()) { pos.setLocation(x, y); visitTRI(writer, pos); writer.nextPixel(); x++; } writer.nextLine(); y++; } return createGridCoverage("TRI", outputImage); }
public GridCoverage2D execute(GridCoverage2D inputGc, SlopeType slopeType, double zFactor) { this.initSurface(inputGc); DiskMemImage outputImage = this.createDiskMemImage(inputGc, RasterPixelType.FLOAT); WritableRectIter writer = RectIterFactory.createWritable(outputImage, outputImage.getBounds()); GridCoordinates2D pos = new GridCoordinates2D(); int y = bounds.y; writer.startLines(); while (!writer.finishedLines()) { int x = bounds.x; writer.startPixels(); while (!writer.finishedPixels()) { pos.setLocation(x, y); visitSlope(writer, pos, slopeType, zFactor); writer.nextPixel(); x++; } writer.nextLine(); y++; } return createGridCoverage("Slope", outputImage); }
public GridCoverage2D execute(GridCoverage2D inputGc) { this.initSurface(inputGc); DiskMemImage outputImage = this.createDiskMemImage(inputGc, RasterPixelType.FLOAT); WritableRectIter writer = RectIterFactory.createWritable(outputImage, outputImage.getBounds()); GridCoordinates2D pos = new GridCoordinates2D(); int y = bounds.y; writer.startLines(); while (!writer.finishedLines()) { int x = bounds.x; writer.startPixels(); while (!writer.finishedPixels()) { pos.setLocation(x, y); visitTPI(writer, pos); writer.nextPixel(); x++; } writer.nextLine(); y++; } return createGridCoverage("TPI", outputImage); }
GridCoordinates2D coord = new GridCoordinates2D();
/** * Returns the number of integer grid coordinates along the specified dimension. This is equals * to {@code getHigh(dimension) - getLow(dimension)}. */ public int getSpan(final int dimension) { switch (dimension) { case 0: return width; case 1: return height; default: throw new IndexOutOfBoundsException(GridCoordinates2D.indexOutOfBounds(dimension)); } }
public GridCoverage2D execute(GridCoverage2D inputGc) { this.initSurface(inputGc); DiskMemImage outputImage = this.createDiskMemImage(inputGc, RasterPixelType.FLOAT); WritableRectIter writer = RectIterFactory.createWritable(outputImage, outputImage.getBounds()); GridCoordinates2D pos = new GridCoordinates2D(); int y = bounds.y; writer.startLines(); while (!writer.finishedLines()) { int x = bounds.x; writer.startPixels(); while (!writer.finishedPixels()) { pos.setLocation(x, y); visitRoughness(writer, pos); writer.nextPixel(); x++; } writer.nextLine(); y++; } return createGridCoverage("Roughness", outputImage); }
MathTransform tr = CRS.findMathTransform(crs, DefaultGeographicCRS.WGS84); GridCoordinates2D coord = new GridCoordinates2D(); for (int gy = 0; gy < height; gy++) { if (gy % 100 == 0)
/** * Returns the valid maximum <strong>inclusive</strong> grid coordinate along the specified * dimension. * * @see #getHigh() */ public int getHigh(final int dimension) { switch (dimension) { case 0: return x + width - 1; case 1: return y + height - 1; default: throw new IndexOutOfBoundsException(GridCoordinates2D.indexOutOfBounds(dimension)); } }
public GridCoverage2D execute(GridCoverage2D inputGc) { this.initSurface(inputGc); DiskMemImage outputImage = this.createDiskMemImage(inputGc, RasterPixelType.FLOAT); WritableRectIter writer = RectIterFactory.createWritable(outputImage, outputImage.getBounds()); GridCoordinates2D pos = new GridCoordinates2D(); int y = bounds.y; writer.startLines(); while (!writer.finishedLines()) { int x = bounds.x; writer.startPixels(); while (!writer.finishedPixels()) { pos.setLocation(x, y); visitAspect(writer, pos); writer.nextPixel(); x++; } writer.nextLine(); y++; } return createGridCoverage("Aspect", outputImage); }
/** * Returns the valid minimum inclusive grid coordinates. The sequence contains a minimum value * for each dimension of the grid coverage. */ public GridCoordinates2D getLow() { return new GridCoordinates2D(x, y); }
/** * Returns the coordinate value at the specified dimension. This method is equivalent to <code> * {@linkplain #getCoordinateValues()}[<var>i</var>]</code>. It is provided for efficienty. * * @param dimension The dimension from 0 inclusive to {@link #getDimension} exclusive. * @return The value at the requested dimension. * @throws IndexOutOfBoundsException if the specified dimension is out of bounds. */ public int getCoordinateValue(final int dimension) throws IndexOutOfBoundsException { switch (dimension) { case 0: return x; case 1: return y; default: throw new IndexOutOfBoundsException(indexOutOfBounds(dimension)); } }
public GridCoverage2D execute(GridCoverage2D inputGc, double azimuth, double altitude, double zFactor) { this.initSurface(inputGc); DiskMemImage outputImage = this.createDiskMemImage(inputGc, RasterPixelType.FLOAT); WritableRectIter writer = RectIterFactory.createWritable(outputImage, outputImage.getBounds()); GridCoordinates2D pos = new GridCoordinates2D(); int y = bounds.y; writer.startLines(); while (!writer.finishedLines()) { int x = bounds.x; writer.startPixels(); while (!writer.finishedPixels()) { pos.setLocation(x, y); visitHillShade(writer, pos, azimuth, altitude, zFactor); writer.nextPixel(); x++; } writer.nextLine(); y++; } return createGridCoverage("Aspect", outputImage); }
/** * Returns the valid maximum <strong>inclusive</strong> grid coordinates. The sequence contains * a maximum value for each dimension of the grid coverage. */ public GridCoordinates2D getHigh() { return new GridCoordinates2D(x + width - 1, y + height - 1); }
/** * Sets the coordinate value at the specified dimension. * * @param dimension The index of the value to set. * @param value The new value. * @throws IndexOutOfBoundsException if the specified dimension is out of bounds. * @throws UnsupportedOperationException if this grid coordinates is not modifiable. */ public void setCoordinateValue(final int dimension, final int value) throws IndexOutOfBoundsException, UnsupportedOperationException { switch (dimension) { case 0: x = value; break; case 1: y = value; break; default: throw new IndexOutOfBoundsException(indexOutOfBounds(dimension)); } }
public GridCoverage2D execute(GridCoverage2D inputGc, double zFactor) { this.initSurface(inputGc); xL2 = CellSizeX * CellSizeX; x2L = 2.0 * CellSizeX; yL2 = CellSizeY * CellSizeY; y2L = 2.0 * CellSizeY; DiskMemImage outputImage = this.createDiskMemImage(inputGc, RasterPixelType.FLOAT); WritableRectIter writer = RectIterFactory.createWritable(outputImage, outputImage.getBounds()); GridCoordinates2D pos = new GridCoordinates2D(); int y = bounds.y; writer.startLines(); while (!writer.finishedLines()) { int x = bounds.x; writer.startPixels(); while (!writer.finishedPixels()) { pos.setLocation(x, y); visitCurvature(writer, pos, zFactor); writer.nextPixel(); x++; } writer.nextLine(); y++; } return createGridCoverage("Curvature", outputImage); }
GridCoordinates2D gc2D = new GridCoordinates2D(); gridFromCRS2D.transform(trPoint, gc2D); return gc2D;
/** * Returns the valid minimum inclusive grid coordinate along the specified dimension. * * @see #getLow() */ public int getLow(final int dimension) { switch (dimension) { case 0: return x; case 1: return y; default: throw new IndexOutOfBoundsException(GridCoordinates2D.indexOutOfBounds(dimension)); } }
/** * Returns the valid minimum inclusive grid coordinates. * The sequence contains a minimum value for each dimension of the grid coverage. */ public GridCoordinates2D getLow() { return new GridCoordinates2D(x, y); }