public class SHPDriverFunction extends Object implements org.h2gis.api.DriverFunction
| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Constructor and Description |
|---|
SHPDriverFunction() |
| Modifier and Type | Method and Description |
|---|---|
void |
exportResultset(Connection connection,
String selectQuery,
File fileName,
org.h2gis.api.EmptyProgressVisitor progress,
String encoding)
Method to export a resulset into a shapefile
|
void |
exportTable(Connection connection,
String tableReference,
File fileName,
org.h2gis.api.ProgressVisitor progress) |
void |
exportTable(Connection connection,
String tableReference,
File fileName,
org.h2gis.api.ProgressVisitor progress,
String encoding) |
String[] |
getExportFormats() |
String |
getFormatDescription(String format) |
org.h2gis.api.DriverFunction.IMPORT_DRIVER_TYPE |
getImportDriverType() |
String[] |
getImportFormats() |
void |
importFile(Connection connection,
String tableReference,
File fileName,
org.h2gis.api.ProgressVisitor progress) |
void |
importFile(Connection connection,
String tableReference,
File fileName,
org.h2gis.api.ProgressVisitor progress,
String forceEncoding) |
boolean |
isSpatialFormat(String extension) |
public static String DESCRIPTION
public void exportTable(Connection connection, String tableReference, File fileName, org.h2gis.api.ProgressVisitor progress) throws SQLException, IOException
exportTable in interface org.h2gis.api.DriverFunctionSQLExceptionIOExceptionpublic void exportTable(Connection connection, String tableReference, File fileName, org.h2gis.api.ProgressVisitor progress, String encoding) throws SQLException, IOException
connection - Active connection, do not close this connection.tableReference - [[catalog.]schema.]table referencefileName - File path to write, if exists it may be replacedprogress - to display the IO progressencoding - File encoding, null will use default encodingSQLExceptionIOExceptionpublic void exportResultset(Connection connection, String selectQuery, File fileName, org.h2gis.api.EmptyProgressVisitor progress, String encoding) throws SQLException, IOException
connection - Active connection, do not close this connection.selectQuery - the select query to exportfileName - File path to write, if exists it may be replacedprogress - to display the IO progressencoding - File encoding, null will use default encodingSQLExceptionIOExceptionpublic String getFormatDescription(String format)
getFormatDescription in interface org.h2gis.api.DriverFunctionpublic org.h2gis.api.DriverFunction.IMPORT_DRIVER_TYPE getImportDriverType()
getImportDriverType in interface org.h2gis.api.DriverFunctionpublic String[] getImportFormats()
getImportFormats in interface org.h2gis.api.DriverFunctionpublic String[] getExportFormats()
getExportFormats in interface org.h2gis.api.DriverFunctionpublic boolean isSpatialFormat(String extension)
isSpatialFormat in interface org.h2gis.api.DriverFunctionpublic void importFile(Connection connection, String tableReference, File fileName, org.h2gis.api.ProgressVisitor progress) throws SQLException, IOException
importFile in interface org.h2gis.api.DriverFunctionSQLExceptionIOExceptionpublic void importFile(Connection connection, String tableReference, File fileName, org.h2gis.api.ProgressVisitor progress, String forceEncoding) throws SQLException, IOException
connection - Active connection, do not close this connection.tableReference - [[catalog.]schema.]table referencefileName - File path to readprogress - forceEncoding - If defined use this encoding instead of the one defined in dbf header.SQLException - Table write errorIOException - File read errorCopyright © 2018 CNRS. All rights reserved.