MathTransform tr = CRS.findMathTransform(crs, DefaultGeographicCRS.WGS84); GridCoordinates2D coord = new GridCoordinates2D(); int i = 0, ns = 0; for (int gy = 0; gy < height; gy++) {
GridCoordinates2D coord = new GridCoordinates2D();
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 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 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); }
GridCoordinates2D gc2D = new GridCoordinates2D(); gridFromCRS2D.transform(trPoint, gc2D); return gc2D;
/** * 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 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); }
/** * Transforms a point represented by a GridCoordinates2D object from grid to world coordinates. The coordinates returned are those of the centre * of the grid cell in which the point lies. * * @param x the X coordinate * @param y the Y coordinate * @return DirectPosition */ public GridCoordinates2D worldToGrid(double x, double y) { int column = getColumn(x); int row = getRow(y); return new GridCoordinates2D(column, row); }
GridCoordinates2D ulPos = new GridCoordinates2D(pos.x - posX, pos.y - posY); Rectangle rect = new Rectangle(ulPos.x, ulPos.y, width, height);
GridCoordinates2D gc2D = new GridCoordinates2D(); gridFromCRS2D.transform(trPoint, gc2D); return gc2D;
GridCoordinates2D ulPos = new GridCoordinates2D(pos.x - posX, pos.y - posY); Rectangle rect = new Rectangle(ulPos.x, ulPos.y, width, height);
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); }
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); }
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); }
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); }
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); }