Package org.openjump.core.rasterimage
Class GridAscii
- java.lang.Object
-
- org.openjump.core.rasterimage.GridAscii
-
public class GridAscii extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BufferedImagegetBufferedImage()longgetCellCount()doublegetCellSize()float[]getFloatArray()doublegetMaxVal()doublegetMeanVal()doublegetMinVal()intgetnCols()doublegetNoData()intgetnRows()booleangetOrigCorner()RastergetRaster()doublegetStDevVal()doublegetXllCorner()doublegetYllCorner()booleanisInteger()booleanisSpatiallyEqualTo(GridAscii gridAscii2)doublereadCellValue(int col, int row)voidreadGrid(Rectangle subset)voidreadHeader()voidsetCellSize(double cellSize)voidsetDecimalPlaces(Integer decimalPlaces)voidsetHeaderEqualTo(GridAscii gridAscii)voidsetnCols(int nCols)voidsetNoData(double noData)voidsetnRows(int nRows)voidsetOrigCorner(boolean origCorner)voidsetRas(Raster raster)voidsetXllCorner(double xllCorner)voidsetYllCorner(double yllCorner)voidwriteGrid()voidwriteHeader(BufferedWriter bufferedWriter)
-
-
-
Constructor Detail
-
GridAscii
public GridAscii(String ascFullFileName) throws IOException
- Throws:
IOException
-
GridAscii
public GridAscii(String ascFullFileName, int nCols, int nRows, boolean origCorner, double xllOrig, double yllOrig, double cellSize, double noData)
-
-
Method Detail
-
readHeader
public final void readHeader() throws FileNotFoundException, IOException- Throws:
FileNotFoundExceptionIOException
-
readGrid
public void readGrid(Rectangle subset) throws FileNotFoundException, IOException
- Throws:
FileNotFoundExceptionIOException
-
writeGrid
public void writeGrid() throws IOException, Exception- Throws:
IOExceptionException
-
writeHeader
public void writeHeader(BufferedWriter bufferedWriter) throws Exception
- Throws:
Exception
-
setHeaderEqualTo
public void setHeaderEqualTo(GridAscii gridAscii)
-
isSpatiallyEqualTo
public boolean isSpatiallyEqualTo(GridAscii gridAscii2)
-
getBufferedImage
public BufferedImage getBufferedImage() throws IOException
- Throws:
IOException
-
readCellValue
public double readCellValue(int col, int row) throws FileNotFoundException, IOException- Throws:
FileNotFoundExceptionIOException
-
getnCols
public int getnCols()
-
setnCols
public void setnCols(int nCols)
-
getnRows
public int getnRows()
-
setnRows
public void setnRows(int nRows)
-
getXllCorner
public double getXllCorner()
-
setXllCorner
public void setXllCorner(double xllCorner)
-
getYllCorner
public double getYllCorner()
-
setYllCorner
public void setYllCorner(double yllCorner)
-
getOrigCorner
public boolean getOrigCorner()
-
setOrigCorner
public void setOrigCorner(boolean origCorner)
-
getCellSize
public double getCellSize()
-
setCellSize
public void setCellSize(double cellSize)
-
getNoData
public double getNoData()
-
setNoData
public void setNoData(double noData)
-
getRaster
public Raster getRaster()
-
setRas
public void setRas(Raster raster)
-
getMinVal
public double getMinVal()
-
getMaxVal
public double getMaxVal()
-
getMeanVal
public double getMeanVal()
-
getStDevVal
public double getStDevVal()
-
getCellCount
public long getCellCount()
-
isInteger
public boolean isInteger()
-
getFloatArray
public float[] getFloatArray()
-
setDecimalPlaces
public void setDecimalPlaces(Integer decimalPlaces)
-
-