insensa
Class CRasterFile

java.lang.Object
  extended by insensa.CRasterFile
Direct Known Subclasses:
CRasterFileInformation

public class CRasterFile
extends java.lang.Object


Field Summary
private  org.gdal.gdal.Band band
           
private  float cellSize
           
private  org.gdal.gdal.Dataset dataset
           
private  int dataType
           
private  java.lang.String datum
           
private  org.gdal.gdal.Driver driver
           
private  java.io.File fileRef
           
private  java.lang.String geocentricCS
           
private  java.lang.String geographicCS
           
private  double[] geoTransform
           
private  java.lang.String localCS
           
private  int nCols
          Anzahl der unterschiedlichen Messwerte
private  float noDataValue
           
private  int nRows
           
private  java.lang.String projectedCS
           
private  java.lang.String projection
           
private  java.lang.String projectionWKT
           
private  org.gdal.osr.SpatialReference spatialReference
           
private  java.lang.String spheroid
           
private  float xllCorner
           
private  float yllCorner
           
 
Constructor Summary
CRasterFile(CRasterFile oldFile)
          Create a new File instance with path+name= newFullFileName and copy all CRasterFile properties!.
CRasterFile(CRasterFile oldFile, java.lang.String newFullFileName)
          Create a new File instance with path+name= newFullFileName and copy all CRasterFile properties!.
CRasterFile(java.lang.String name)
           
 
Method Summary
 void createFileCopy(CRasterFile oldFile, WorkerStatusCallback callback)
          Creates a new File on hard disk with Path of File.absolutePath;
 boolean createNewFile(CRasterFile oldFile, int dataType, double noDataValue)
           
private  void createRasterInformation()
           
 boolean delete()
           
 boolean exists()
           
 java.io.File getAbsoluteFile()
           
 java.lang.String getAbsolutePath()
           
 org.gdal.gdal.Band getBand(int gdalAccess)
           
 float getCellSize()
           
 org.gdal.gdal.Dataset getDataset(int gdalAccess)
           
 int getDataType()
           
 java.lang.String getDatum()
           
 org.gdal.gdal.Driver getDriver(int gdalAccess)
           
 java.io.File getFileRef()
           
 java.lang.String getGeocentricCS()
           
 java.lang.String getGeographicCS()
           
 double[] getGeoTransform()
           
 java.lang.String getName()
           
 int getNCols()
           
 float getNoDataValue()
           
 int getNRows()
           
 java.lang.String getParent()
           
 java.lang.String getProjectedCS()
           
 java.lang.String getProjection()
           
 java.lang.String getProjectionWKT()
           
 org.gdal.osr.SpatialReference getSpatialReference()
           
 java.util.Map<java.lang.String,java.lang.String> getSpatialReferenceAttr()
           
 java.lang.String getSpheroid()
           
 void getValues(CRasterFile rFile)
           
 float getXllCorner()
           
 float getYllCorner()
           
private  void openGdalConnection(int gdalAccess)
           
 void refresh()
           
 void relocateFile(java.lang.String newPath)
           
 boolean renameTo(java.io.File dest)
          just renames the file reference and saves dest as new file reference.
 void setCellSize(float cellSize)
           
 void setNCols(int nCols)
           
 void setNoDataValue(float noDataValue)
           
 void setNRows(int nRows)
           
 void setXllCorner(float xllCorner)
           
 void setYllCorner(float yllCorner)
           
 void unlock()
           
 void writeNodataValue(double nodataValue)
           
 void writeNodataValueMax()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nCols

private int nCols
Anzahl der unterschiedlichen Messwerte


nRows

private int nRows

xllCorner

private float xllCorner

yllCorner

private float yllCorner

noDataValue

private float noDataValue

cellSize

private float cellSize

dataset

private org.gdal.gdal.Dataset dataset

driver

private org.gdal.gdal.Driver driver

band

private org.gdal.gdal.Band band

dataType

private int dataType

projectionWKT

private java.lang.String projectionWKT

projectedCS

private java.lang.String projectedCS

geocentricCS

private java.lang.String geocentricCS

projection

private java.lang.String projection

geographicCS

private java.lang.String geographicCS

datum

private java.lang.String datum

spheroid

private java.lang.String spheroid

localCS

private java.lang.String localCS

geoTransform

private double[] geoTransform

spatialReference

private org.gdal.osr.SpatialReference spatialReference

fileRef

private java.io.File fileRef
Constructor Detail

CRasterFile

public CRasterFile(CRasterFile oldFile)
            throws java.io.IOException,
                   CRasterFileException
Create a new File instance with path+name= newFullFileName and copy all CRasterFile properties!.

Parameters:
oldFile -
Throws:
java.io.IOException
CRasterFileException

CRasterFile

public CRasterFile(CRasterFile oldFile,
                   java.lang.String newFullFileName)
            throws java.io.IOException,
                   CRasterFileException
Create a new File instance with path+name= newFullFileName and copy all CRasterFile properties!.

Parameters:
oldFile -
newFullFileName -
Throws:
java.io.IOException
CRasterFileException

CRasterFile

public CRasterFile(java.lang.String name)
            throws java.io.IOException,
                   CRasterFileException
Parameters:
name -
Throws:
java.io.IOException
CRasterFileException
Method Detail

createFileCopy

public void createFileCopy(CRasterFile oldFile,
                           WorkerStatusCallback callback)
                    throws java.io.IOException,
                           CRasterFileException
Creates a new File on hard disk with Path of File.absolutePath;

Parameters:
oldFile -
callback -
Throws:
java.io.IOException
CRasterFileException

createNewFile

public boolean createNewFile(CRasterFile oldFile,
                             int dataType,
                             double noDataValue)
                      throws java.io.IOException,
                             CRasterFileException
Parameters:
oldFile -
dataType -
noDataValue -
Returns:
Throws:
java.io.IOException
CRasterFileException

createRasterInformation

private void createRasterInformation()
                              throws java.io.IOException,
                                     CRasterFileException
Throws:
java.io.IOException
CRasterFileException

delete

public boolean delete()
Returns:

exists

public boolean exists()
Returns:

getAbsoluteFile

public java.io.File getAbsoluteFile()
Returns:

getAbsolutePath

public java.lang.String getAbsolutePath()
Returns:

getBand

public org.gdal.gdal.Band getBand(int gdalAccess)
                           throws java.io.IOException
Parameters:
gdalAccess -
Returns:
Throws:
java.io.IOException

getCellSize

public float getCellSize()
Returns:
the cellSize

getDataset

public org.gdal.gdal.Dataset getDataset(int gdalAccess)
                                 throws java.io.IOException
Parameters:
gdalAccess -
Returns:
Throws:
java.io.IOException

getDataType

public int getDataType()
Returns:

getDatum

public java.lang.String getDatum()
Returns:

getDriver

public org.gdal.gdal.Driver getDriver(int gdalAccess)
                               throws java.io.IOException
Parameters:
gdalAccess -
Returns:
Throws:
java.io.IOException

getFileRef

public java.io.File getFileRef()
Returns:

getGeocentricCS

public java.lang.String getGeocentricCS()
Returns:

getGeographicCS

public java.lang.String getGeographicCS()
Returns:

getGeoTransform

public double[] getGeoTransform()
Returns:

getName

public java.lang.String getName()
Returns:

getNCols

public int getNCols()
Returns:
the nCols

getNoDataValue

public float getNoDataValue()
Returns:
the noDataValue

getNRows

public int getNRows()
Returns:
the nRows

getParent

public java.lang.String getParent()
Returns:

getProjectedCS

public java.lang.String getProjectedCS()
Returns:

getProjection

public java.lang.String getProjection()
Returns:

getProjectionWKT

public java.lang.String getProjectionWKT()
Returns:

getSpatialReference

public org.gdal.osr.SpatialReference getSpatialReference()
Returns:

getSpatialReferenceAttr

public java.util.Map<java.lang.String,java.lang.String> getSpatialReferenceAttr()
Returns:
the maxValue

getSpheroid

public java.lang.String getSpheroid()
Returns:

getValues

public void getValues(CRasterFile rFile)
Parameters:
rFile -

getXllCorner

public float getXllCorner()
Returns:
the xllCorner

getYllCorner

public float getYllCorner()
Returns:
the yllCorner

openGdalConnection

private void openGdalConnection(int gdalAccess)
                         throws java.io.IOException
Parameters:
gdalAccess -
Throws:
java.io.IOException

refresh

public void refresh()
             throws java.io.IOException,
                    CRasterFileException
Throws:
java.io.IOException
CRasterFileException

relocateFile

public void relocateFile(java.lang.String newPath)
Parameters:
newPath -

renameTo

public boolean renameTo(java.io.File dest)
                 throws java.io.IOException
just renames the file reference and saves dest as new file reference.

Parameters:
dest -
Returns:
Throws:
java.io.IOException

setCellSize

public void setCellSize(float cellSize)
Parameters:
cellSize -

setNCols

public void setNCols(int nCols)
Parameters:
nCols -

setNoDataValue

public void setNoDataValue(float noDataValue)
Parameters:
noDataValue -

setNRows

public void setNRows(int nRows)
Parameters:
nRows -

setXllCorner

public void setXllCorner(float xllCorner)
Parameters:
xllCorner -

setYllCorner

public void setYllCorner(float yllCorner)
Parameters:
yllCorner -

unlock

public void unlock()

writeNodataValue

public void writeNodataValue(double nodataValue)
                      throws java.io.IOException
Parameters:
nodataValue -
Throws:
java.io.IOException

writeNodataValueMax

public void writeNodataValueMax()
                         throws java.io.IOException
Throws:
java.io.IOException