com.mizar.metadata.gdal
Class GdalDataset

java.lang.Object
  extended by com.mizar.metadata.gdal.GdalDataset

public class GdalDataset
extends java.lang.Object


Constructor Summary
GdalDataset()
           
GdalDataset(java.io.File file)
           
GdalDataset(java.io.File file, boolean readOnly)
           
 
Method Summary
 void close()
           
 GdalDataset copyToOracle(java.lang.String username, java.lang.String password, java.lang.String layerName, java.lang.String rdtName, java.lang.Long rasterId, java.lang.Integer blockSize)
           
 GdalDataset copyToOracleA(java.lang.String username, java.lang.String password, java.lang.String layerName, java.lang.String rdtName, java.lang.String sequenceName)
          This method actually succeeds in loading RDT_WORKING_RAW but then hangs for a long time.
 GdalDataset copyToOracleB(java.lang.String username, java.lang.String password, java.lang.String layerName, java.lang.String rdtName, java.lang.Long rasterId, java.lang.Integer blockSize)
           
 GdalDataset copyToOracleC(java.lang.String username, java.lang.String password, java.lang.String layerName, java.lang.String rdtName, java.lang.Long rasterId, java.lang.Integer blockSize)
           
static boolean defaultErrorHandler()
           
 void destroyDriverManager()
           
 java.lang.String geographicFormat(double ordinate)
           
 java.lang.Long getBands()
           
 double[] getCenter()
           
 double[] getCoordinate(double xPixel, double yPixel)
           
 double[] getCoordinate(int xPixel, int yPixel)
           
 org.gdal.gdal.Dataset getDataset()
           
 java.io.File getFile()
           
 java.lang.String getFormattedRange()
           
static java.util.Map<java.lang.Integer,java.lang.Integer> getGdtWidths()
           
 GdalHistogram getHistogram()
           
static java.util.List<java.lang.String> getImageTypes()
           
 java.lang.Double getLinearUnits()
           
 java.lang.String getProjectionName()
           
 java.lang.String getProjectionWkt()
           
 double[] getRange()
           
 GdalReport getReport()
           
 GdalReport getReport(int mode)
           
 org.gdal.osr.SpatialReference getSpatialReference()
           
 java.lang.Long getSrid()
           
 java.lang.String getUnitsName()
           
 java.lang.String getVersionInfo()
           
 boolean isGeographic()
           
 boolean isLocal()
           
 boolean isOpen()
           
 boolean isProjected()
           
 boolean isReadOnly()
           
static boolean loggingErrorHandler()
           
 void open(java.io.File file)
           
 void open(java.io.File file, boolean readOnly)
           
static int popAllErrorHandlers()
           
static int popErrorHandler()
           
static boolean quietErrorHandler()
           
 void setFile(java.io.File file)
           
 void setReadOnly(boolean readOnly)
           
 double[] toGeographic(double[] ordinates)
           
 double[] toGeographic(double dfGeoX, double dfGeoY)
           
 double[] toGeographic(org.gdal.osr.SpatialReference srGeographic, double dfGeoX, double dfGeoY)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GdalDataset

public GdalDataset()

GdalDataset

public GdalDataset(java.io.File file)
            throws java.io.IOException,
                   GdalException
Throws:
java.io.IOException
GdalException

GdalDataset

public GdalDataset(java.io.File file,
                   boolean readOnly)
            throws java.io.IOException,
                   GdalException
Throws:
java.io.IOException
GdalException
Method Detail

open

public void open(java.io.File file)
          throws java.io.IOException,
                 GdalException
Throws:
java.io.IOException
GdalException

close

public void close()

destroyDriverManager

public void destroyDriverManager()

quietErrorHandler

public static boolean quietErrorHandler()

defaultErrorHandler

public static boolean defaultErrorHandler()

loggingErrorHandler

public static boolean loggingErrorHandler()

popErrorHandler

public static int popErrorHandler()

popAllErrorHandlers

public static int popAllErrorHandlers()

open

public void open(java.io.File file,
                 boolean readOnly)
          throws java.io.IOException,
                 GdalException
Throws:
java.io.IOException
GdalException

copyToOracle

public GdalDataset copyToOracle(java.lang.String username,
                                java.lang.String password,
                                java.lang.String layerName,
                                java.lang.String rdtName,
                                java.lang.Long rasterId,
                                java.lang.Integer blockSize)
                         throws GdalException
Parameters:
username - of the target schema
password - this must include the @Tnsname
layerName - the name of the georaster layer table (must already exist)
rdtName - is null defaults to "RDT_"+layername (must already exist)
rasterId - a unique value
blockSize - if null defaults to 512
Returns:
a new GdalDataset for the created copy
Throws:
GdalException

copyToOracleC

public GdalDataset copyToOracleC(java.lang.String username,
                                 java.lang.String password,
                                 java.lang.String layerName,
                                 java.lang.String rdtName,
                                 java.lang.Long rasterId,
                                 java.lang.Integer blockSize)
                          throws GdalException
Parameters:
username - of the target schema
password - this must include the @Tnsname
layerName - the name of the georaster layer table (must already exist)
rdtName - is null defaults to "RDT_"+layername (must already exist)
rasterId - a unique value
blockSize - if null defaults to 512
Returns:
a new GdalDataset for the created copy
Throws:
GdalException

copyToOracleB

public GdalDataset copyToOracleB(java.lang.String username,
                                 java.lang.String password,
                                 java.lang.String layerName,
                                 java.lang.String rdtName,
                                 java.lang.Long rasterId,
                                 java.lang.Integer blockSize)
                          throws GdalException
Parameters:
username - of the target schema
password - this must include the @Tnsname
layerName - the name of the georaster layer table (must already exist)
rdtName - is null defaults to "RDT_"+layername (must already exist)
rasterId - a unique value
blockSize - if null defaults to 512
Returns:
a new GdalDataset for the created copy
Throws:
GdalException

copyToOracleA

public GdalDataset copyToOracleA(java.lang.String username,
                                 java.lang.String password,
                                 java.lang.String layerName,
                                 java.lang.String rdtName,
                                 java.lang.String sequenceName)
This method actually succeeds in loading RDT_WORKING_RAW but then hangs for a long time. When it finally completed it stuck on the datasetClose() and the dumpted this. ERROR 1: OCI_INVALID_HANDLE ERROR 1: OCI_INVALID_HANDLE # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00002aadb3d5e85a, pid=19491, tid=1093974336 # # JRE version: 6.0_21-b06 # Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0-b16 mixed mode linux-amd64 ) # Problematic frame: # C [libclntsh.so.11.1+0x1d2685a] kpugattr+0x42 # # An error report file with more information is saved as: # /home/mmillman/Applications/BuckeyeLoader/hs_err_pid19491.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # Ouput dataset: (georaster:buckeye_sp,buckeye_sp,alpha1,RDT_WORKING_RAW,2) on BUCKEYE_SP.WORKING_RAW,GEORASTER

Parameters:
username -
password - this must include the @Tnsname
layerName -
Returns:
a new GdalDataset for the created copy

getDataset

public org.gdal.gdal.Dataset getDataset()

setFile

public void setFile(java.io.File file)

getFile

public java.io.File getFile()

setReadOnly

public void setReadOnly(boolean readOnly)

isReadOnly

public boolean isReadOnly()

isOpen

public boolean isOpen()

isProjected

public boolean isProjected()

isGeographic

public boolean isGeographic()

isLocal

public boolean isLocal()

getSrid

public java.lang.Long getSrid()

getProjectionName

public java.lang.String getProjectionName()

getLinearUnits

public java.lang.Double getLinearUnits()

getUnitsName

public java.lang.String getUnitsName()

getProjectionWkt

public java.lang.String getProjectionWkt()

getSpatialReference

public org.gdal.osr.SpatialReference getSpatialReference()

getBands

public java.lang.Long getBands()

getCenter

public double[] getCenter()

getRange

public double[] getRange()

getFormattedRange

public java.lang.String getFormattedRange()

getCoordinate

public double[] getCoordinate(int xPixel,
                              int yPixel)
                       throws GdalException
Throws:
GdalException

getCoordinate

public double[] getCoordinate(double xPixel,
                              double yPixel)
                       throws GdalException
Throws:
GdalException

toGeographic

public double[] toGeographic(double dfGeoX,
                             double dfGeoY)

toGeographic

public double[] toGeographic(org.gdal.osr.SpatialReference srGeographic,
                             double dfGeoX,
                             double dfGeoY)

toGeographic

public double[] toGeographic(double[] ordinates)

geographicFormat

public java.lang.String geographicFormat(double ordinate)

getVersionInfo

public java.lang.String getVersionInfo()

getHistogram

public GdalHistogram getHistogram()

getReport

public GdalReport getReport()

getReport

public GdalReport getReport(int mode)

getGdtWidths

public static java.util.Map<java.lang.Integer,java.lang.Integer> getGdtWidths()

getImageTypes

public static java.util.List<java.lang.String> getImageTypes()