本文整理了Java中javax.media.jai.iterator.RectIter.startLines
方法的一些代码示例,展示了RectIter.startLines
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RectIter.startLines
方法的具体详情如下:
包路径:javax.media.jai.iterator.RectIter
类名称:RectIter
方法名:startLines
暂无
代码示例来源:origin: geotools/geotools
/** Sets the iterator to the first line of its bounding rectangle. */
public void startLines() {
src.startLines();
dst.startLines();
}
代码示例来源:origin: geotools/geotools
public RasterAsPointFeatureIterator(final RasterAsPointFeatureCollection fc) {
// checks
Utilities.ensureNonNull("fc", fc);
// get elements
this.fc = fc;
this.fb = new SimpleFeatureBuilder(fc.getSchema());
this.size = fc.size;
// create an iterator that only goes forward, it is the fastest one
iterator = RectIterFactory.create(fc.gc2d.getRenderedImage(), null);
//
// start the iterator
//
iterator.startLines();
if (iterator.finishedLines()) {
throw new NoSuchElementException("Index beyond size:" + index + ">" + size);
}
iterator.startPixels();
if (iterator.finishedPixels()) {
throw new NoSuchElementException("Index beyond size:" + index + ">" + size);
}
// appo
temp = new double[fc.numBands];
// grid convergence angle manager
if (fc.gridConvergenceAngleCorrectionNeeded) {
sourceCRSPosition = new DirectPosition2D();
targetCRSPosition = new DirectPosition2D(fc.targetCRS);
}
}
代码示例来源:origin: geotools/geotools
boolean[][] gaps = hasNoData ? new boolean[samples.length][samples[0].length] : null;
for (; band < bandUp; band++) {
iter.startLines();
int j = 0;
do {
代码示例来源:origin: geotools/geotools
boolean[][] gaps = hasNoData ? new boolean[samples.length][samples[0].length] : null;
for (; band < bandUp; band++) {
iter.startLines();
int j = 0;
do {
代码示例来源:origin: org.geotools/gt2-coverageio
/**
* Sets the iterator to the first line of its bounding rectangle.
*/
public void startLines() {
iterator.startLines();
}
代码示例来源:origin: geotools/geotools
boolean[][] gaps = hasNoData ? new boolean[samples.length][samples[0].length] : null;
for (; band < bandUp; band++) {
iter.startLines();
int j = 0;
do {
代码示例来源:origin: org.geotools/gt-coverage
/**
* Sets the iterator to the first line of its bounding rectangle.
*/
public void startLines() {
src.startLines();
dst.startLines();
}
代码示例来源:origin: org.geotools/gt2-coverage
/**
* Sets the iterator to the first line of its bounding rectangle.
*/
public void startLines() {
src.startLines();
dst.startLines();
}
代码示例来源:origin: Geomatys/geotoolkit
/**
* Sets the iterator to the first line of its bounding rectangle.
*/
@Override
public void startLines() {
src.startLines();
dst.startLines();
}
代码示例来源:origin: mapplus/spatial_statistics_for_geotools_udig
RectIter readIter = RectIterFactory.create(inputImage, inputImage.getBounds());
readIter.startLines();
while (!readIter.finishedLines()) {
readIter.startPixels();
代码示例来源:origin: org.geotools/gt-process-raster
public RasterAsPointFeatureIterator(final RasterAsPointFeatureCollection fc) {
//checks
Utilities.ensureNonNull("fc", fc);
//get elements
this.fc= fc;
this.fb = new SimpleFeatureBuilder(fc.getSchema());
this.size=fc.size;
// create an iterator that only goes forward, it is the fastest one
iterator= RectIterFactory.create(fc.gc2d.getRenderedImage(), null);
//
//start the iterator
//
iterator.startLines();
if(iterator.finishedLines())
throw new NoSuchElementException("Index beyond size:"+index+">"+size);
iterator.startPixels();
if(iterator.finishedPixels())
throw new NoSuchElementException("Index beyond size:"+index+">"+size);
// appo
temp= new double[fc.numBands];
}
代码示例来源:origin: org.jaitools/jt-utils
/**
* Sets the delegate iterator position. If {@code newPos} is outside
* the target image bounds, the delegate iterator does not move.
*/
protected void setDelegatePosition() {
if (isInsideDelegateBounds()) {
int dy = mainPos.y - delegatePos.y;
if (dy < 0) {
delegateIter.startLines();
delegatePos.y = delegateBounds.y;
dy = mainPos.y - delegateBounds.y;
}
while (dy > 0) {
delegateIter.nextLineDone();
delegatePos.y++ ;
dy--;
}
int dx = mainPos.x - delegatePos.x;
if (dx < 0) {
delegateIter.startPixels();
delegatePos.x = delegateBounds.x;
dx = mainPos.x - delegateBounds.x;
}
while (dx > 0) {
delegateIter.nextPixelDone();
delegatePos.x++ ;
dx--;
}
}
}
代码示例来源:origin: org.jaitools/jt-contour
iter.startLines();
while (!iter.finishedLines()) {
iter.startPixels();
代码示例来源:origin: com.googlecode.jaitools/jt-contour
iter.startLines();
while (!iter.finishedLines()) {
iter.startPixels();
代码示例来源:origin: mapplus/spatial_statistics_for_geotools_udig
readIter.startLines();
while (!readIter.finishedLines()) {
aRx[dy] = new int[numColumns];
代码示例来源:origin: mapplus/spatial_statistics_for_geotools_udig
public void visit(GridCoverage2D inputCoverage, Integer bandIndex) {
reset();
PlanarImage inputImage = (PlanarImage) inputCoverage.getRenderedImage();
RectIter readIter = RectIterFactory.create(inputImage, inputImage.getBounds());
readIter.startLines();
while (!readIter.finishedLines()) {
readIter.startPixels();
while (!readIter.finishedPixels()) {
double sampleValue = readIter.getSampleDouble(bandIndex);
visit(Double.valueOf(sampleValue));
readIter.nextPixel();
}
readIter.nextLine();
}
}
代码示例来源:origin: mapplus/spatial_statistics_for_geotools_udig
public CoverageToPointFeatureIterator(GridCoverage2D coverage, int bandIndex,
String valueField, boolean retainNoData, SimpleFeatureType schema) {
this.bandIndex = bandIndex;
this.valueField = valueField;
this.retainNoData = retainNoData;
this.noData = RasterHelper.getNoDataValue(coverage);
this.builder = new SimpleFeatureBuilder(schema);
this.typeName = coverage.getName().toString();
this.pixelType = RasterHelper.getTransferType(coverage);
this.trans = new GridTransformer(coverage.getGridGeometry());
GridGeometry2D gridGeometry2D = coverage.getGridGeometry();
AffineTransform gridToCRS = (AffineTransform) gridGeometry2D.getGridToCRS2D();
width = Math.abs(gridToCRS.getScaleX()) / 2.0;
height = Math.abs(gridToCRS.getScaleY()) / 2.0;
PlanarImage inputImage = (PlanarImage) coverage.getRenderedImage();
this.readIter = RectIterFactory.create(inputImage, inputImage.getBounds());
this.bounds = inputImage.getBounds();
currentRow = 0;
rowCount = inputImage.getHeight();
this.readIter.startLines();
}
代码示例来源:origin: mapplus/spatial_statistics_for_geotools_udig
public CoverageToPointFeatureIterator(GridCoverage2D coverage, int bandIndex,
String valueField, boolean retainNoData, SimpleFeatureType schema) {
this.bandIndex = bandIndex;
this.valueField = valueField;
this.retainNoData = retainNoData;
this.noData = RasterHelper.getNoDataValue(coverage);
this.builder = new SimpleFeatureBuilder(schema);
this.typeName = coverage.getName().toString();
this.pixelType = RasterHelper.getTransferType(coverage);
this.trans = new GridTransformer(coverage.getGridGeometry());
PlanarImage inputImage = (PlanarImage) coverage.getRenderedImage();
this.bounds = inputImage.getBounds();
this.readIter = RectIterFactory.create(inputImage, bounds);
currentRow = 0;
rowCount = inputImage.getHeight();
this.readIter.startLines();
}
代码示例来源:origin: mapplus/spatial_statistics_for_geotools_udig
outputImage.getBounds());
nirIter.startLines();
redIter.startLines();
writerIter.startLines();
while (!nirIter.finishedLines() && !redIter.finishedLines() && !writerIter.finishedLines()) {
代码示例来源:origin: mapplus/spatial_statistics_for_geotools_udig
public GridCoverage2D execute(GridCoverage2D inputGc, double[] fuzzyValues) {
DiskMemImage outputImage = this.createDiskMemImage(inputGc, RasterPixelType.FLOAT);
PlanarImage inputImage = (PlanarImage) inputGc.getRenderedImage();
final double inputNoData = RasterHelper.getNoDataValue(inputGc);
this.NoData = RasterHelper.getDefaultNoDataValue(PixelType);
RectIter inputIter = RectIterFactory.create(inputImage, inputImage.getBounds());
WritableRectIter writerIter = RectIterFactory.createWritable(outputImage,
outputImage.getBounds());
inputIter.startLines();
writerIter.startLines();
while (!inputIter.finishedLines() && !writerIter.finishedLines()) {
inputIter.startPixels();
writerIter.startPixels();
while (!inputIter.finishedPixels() && !writerIter.finishedPixels()) {
final double inputVal = inputIter.getSampleDouble(0);
if (SSUtils.compareDouble(inputNoData, inputVal)) {
writerIter.setSample(0, NoData);
} else {
double fuzzyValue = getFuzzyValue(inputVal, fuzzyValues) * maxRange;
writerIter.setSample(0, fuzzyValue);
updateStatistics(inputVal);
}
inputIter.nextPixel();
writerIter.nextPixel();
}
inputIter.nextLine();
writerIter.nextLine();
}
return createGridCoverage("Fuzzy", outputImage);
}
内容来源于网络,如有侵权,请联系作者删除!