Package org.h2gis.functions.io.shp
Class SHPRead
- java.lang.Object
-
- org.h2gis.api.AbstractFunction
-
- org.h2gis.functions.io.shp.SHPRead
-
- All Implemented Interfaces:
org.h2gis.api.Function,org.h2gis.api.ScalarFunction
public class SHPRead extends org.h2gis.api.AbstractFunction implements org.h2gis.api.ScalarFunctionSQL Function to copy Shape File data into a Table.- Author:
- Nicolas Fortin, Erwan Bocher, CNRS
-
-
Constructor Summary
Constructors Constructor Description SHPRead()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetJavaStaticMethod()static voidimportTable(Connection connection, String fileName)Copy data from Shape File into a new table in specified connection.static voidimportTable(Connection connection, String fileName, String tableReference, String forceEncoding, boolean deleteTables)Copy data from Shape File into a new table in specified connection.static voidimportTable(Connection connection, String fileName, String tableReference, org.h2.value.Value option)Copy data from Shape File into a new table in specified connection.static voidimportTable(Connection connection, String fileName, org.h2.value.Value option)Copy data from Shape File into a new table in specified connection.-
Methods inherited from class org.h2gis.api.AbstractFunction
addProperty, getProperty, removeProperty
-
-
-
-
Method Detail
-
getJavaStaticMethod
public String getJavaStaticMethod()
- Specified by:
getJavaStaticMethodin interfaceorg.h2gis.api.ScalarFunction
-
importTable
public static void importTable(Connection connection, String fileName, String tableReference, org.h2.value.Value option) throws IOException, SQLException
Copy data from Shape File into a new table in specified connection.- Parameters:
connection- Active connectiontableReference- [[catalog.]schema.]table referenceoption- Could be string file encoding charset or boolean value to delete the existing tablefileName- File path of the SHP file or URI- Throws:
IOExceptionSQLException
-
importTable
public static void importTable(Connection connection, String fileName, String tableReference, String forceEncoding, boolean deleteTables) throws IOException, SQLException
Copy data from Shape File into a new table in specified connection.- Parameters:
connection- Active connectiontableReference- [[catalog.]schema.]table referenceforceEncoding- Use this encoding instead of DBF file header encoding property.fileName- File path of the SHP file or URIdeleteTables- delete existing tables- Throws:
IOExceptionSQLException
-
importTable
public static void importTable(Connection connection, String fileName, org.h2.value.Value option) throws IOException, SQLException
Copy data from Shape File into a new table in specified connection.- Parameters:
connection- Active connectionfileName- File path of the SHP file or URIoption- [[catalog.]schema.]table reference- Throws:
IOExceptionSQLException
-
importTable
public static void importTable(Connection connection, String fileName) throws IOException, SQLException
Copy data from Shape File into a new table in specified connection. The newly created table is given the same name as the filename without the ".shp" extension. If such a table already exists, an exception is thrown.- Parameters:
connection- Active connectionfileName- File path of the SHP file or URI- Throws:
IOExceptionSQLException
-
-