Package org.h2gis.functions.io.shp
Class SHPWrite
java.lang.Object
org.h2gis.api.AbstractFunction
org.h2gis.functions.io.shp.SHPWrite
- All Implemented Interfaces:
org.h2gis.api.Function,org.h2gis.api.ScalarFunction
public class SHPWrite
extends org.h2gis.api.AbstractFunction
implements org.h2gis.api.ScalarFunction
SQL Function to read a table and write it into a shape file.
- Author:
- Nicolas Fortin, Erwan Bocher, CNRS
-
Field Summary
Fields inherited from interface org.h2gis.api.Function
PROP_NAME, PROP_REMARKSFields inherited from interface org.h2gis.api.ScalarFunction
PROP_DETERMINISTIC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidexportTable(Connection connection, String fileName, String tableReference) Read a table and write it into a shape file.static voidexportTable(Connection connection, String fileName, String tableReference, String encoding, boolean deleteFiles) Read a table and write it into a shape file.static voidexportTable(Connection connection, String fileName, String tableReference, org.h2.value.Value option) Read a table and write it into a shape file.Methods inherited from class org.h2gis.api.AbstractFunction
addProperty, getProperty, removePropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.h2gis.api.Function
getProperty
-
Constructor Details
-
SHPWrite
public SHPWrite()
-
-
Method Details
-
getJavaStaticMethod
- Specified by:
getJavaStaticMethodin interfaceorg.h2gis.api.ScalarFunction
-
exportTable
public static void exportTable(Connection connection, String fileName, String tableReference) throws IOException, SQLException Read a table and write it into a shape file.- Parameters:
connection- Active connectionfileName- Shape file name or URItableReference- Table name- Throws:
IOExceptionSQLException
-
exportTable
public static void exportTable(Connection connection, String fileName, String tableReference, org.h2.value.Value option) throws IOException, SQLException Read a table and write it into a shape file.- Parameters:
connection- Active connectionfileName- Shape file name or URItableReference- Table name or select query Note : The select query must be enclosed in parenthesisoption- Could be string file encoding charset or boolean value to delete the existing file- Throws:
IOExceptionSQLException
-
exportTable
public static void exportTable(Connection connection, String fileName, String tableReference, String encoding, boolean deleteFiles) throws IOException, SQLException Read a table and write it into a shape file.- Parameters:
connection- Active connectionfileName- Shape file name or URItableReference- Table name or select query Note : The select query must be enclosed in parenthesisencoding- charset encodingdeleteFiles- true to delete output file- Throws:
IOExceptionSQLException
-