com.mizar.persistence.jdbc.convert
Class JdbcShapeFileReader

java.lang.Object
  extended by com.mizar.persistence.jdbc.convert.JdbcShapeFileReader

public class JdbcShapeFileReader
extends java.lang.Object


Field Summary
protected static double TOLERANCE
           
 
Constructor Summary
protected JdbcShapeFileReader()
           
 
Method Summary
static int countZippedShapeFileRecords(java.io.BufferedWriter out, java.lang.String folder, java.lang.String tmpFolder)
           
static java.io.PrintWriter getLogWriter()
           
static int loadTable(java.sql.Connection conn, java.lang.String tableName, java.lang.String geomColumn, oracle.spatial.util.ShapefileReaderJGeom shapeFileReader, oracle.spatial.util.ShapefileFeatureJGeom shapeFileFeature, oracle.spatial.util.DBFReaderJGeom dbaseFileReader, int srid)
          Performs the insertion of shapefile data into sdo table.
static int loadTable(java.sql.Connection conn, java.lang.String tableName, java.lang.String shapefile, java.lang.String geomColumn, int srid)
           
static int loadTable(java.lang.String url, java.lang.String user, java.lang.String pword, java.lang.String tableName, java.lang.String shapefile, java.lang.String geomColumn, int srid)
           
static void logFlush()
           
static void logPrint(java.lang.String message)
           
static void logPrintln(java.lang.String message)
           
static void main(java.lang.String[] args)
           
static int readShapeFiles(java.sql.Connection conn, java.lang.String controlFile)
           
static int readZippedShapeFiles(java.lang.String url, java.lang.String user, java.lang.String pword, java.lang.String folder, java.lang.String tmpFolder)
          TODO: this class needs to recurse into Zip file folders This method is designed and tested for MAF/Tiger 2007 and 2009 files
static void setLogWriter(java.io.PrintWriter logWriter)
           
static void test2()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOLERANCE

protected static final double TOLERANCE
See Also:
Constant Field Values
Constructor Detail

JdbcShapeFileReader

protected JdbcShapeFileReader()
Method Detail

loadTable

public static int loadTable(java.lang.String url,
                            java.lang.String user,
                            java.lang.String pword,
                            java.lang.String tableName,
                            java.lang.String shapefile,
                            java.lang.String geomColumn,
                            int srid)
                     throws java.sql.SQLException
Throws:
java.sql.SQLException

loadTable

public static int loadTable(java.sql.Connection conn,
                            java.lang.String tableName,
                            java.lang.String shapefile,
                            java.lang.String geomColumn,
                            int srid)

loadTable

public static int loadTable(java.sql.Connection conn,
                            java.lang.String tableName,
                            java.lang.String geomColumn,
                            oracle.spatial.util.ShapefileReaderJGeom shapeFileReader,
                            oracle.spatial.util.ShapefileFeatureJGeom shapeFileFeature,
                            oracle.spatial.util.DBFReaderJGeom dbaseFileReader,
                            int srid)
Performs the insertion of shapefile data into sdo table.

Parameters:
conn - Oracle connection object
tableName - Name of the SDO table to populate
geomColumn - Name of the sdo_geometry column
shapeFileReader - ShapeFileReader object
shapeFileFeature - ShapeFileFeature object
dbaseFileReader - Dbf reader object
srid - SRID projection number

readShapeFiles

public static int readShapeFiles(java.sql.Connection conn,
                                 java.lang.String controlFile)

countZippedShapeFileRecords

public static int countZippedShapeFileRecords(java.io.BufferedWriter out,
                                              java.lang.String folder,
                                              java.lang.String tmpFolder)

readZippedShapeFiles

public static int readZippedShapeFiles(java.lang.String url,
                                       java.lang.String user,
                                       java.lang.String pword,
                                       java.lang.String folder,
                                       java.lang.String tmpFolder)
TODO: this class needs to recurse into Zip file folders This method is designed and tested for MAF/Tiger 2007 and 2009 files

Parameters:
url -
user -
pword -
folder -
tmpFolder -
Returns:

setLogWriter

public static void setLogWriter(java.io.PrintWriter logWriter)

getLogWriter

public static java.io.PrintWriter getLogWriter()

logFlush

public static void logFlush()

logPrint

public static void logPrint(java.lang.String message)

logPrintln

public static void logPrintln(java.lang.String message)

test2

public static void test2()

main

public static void main(java.lang.String[] args)