Package org.h2gis.functions.io.shp

# Class SHPDriverFunction

java.lang.Object
org.h2gis.functions.io.shp.SHPDriverFunction

All Implemented Interfaces:
  `org.h2gis.api.DriverFunction`

public class SHPDriverFunction extends Object implements org.h2gis.api.DriverFunction
Read/Write Shape files

Author:
  Nicolas Fortin, Sylvain PALOMINOS (UBS 2019)

## Nested Class Summary

## Nested classes/interfaces inherited from interface org.h2gis.api.DriverFunction

`org.h2gis.api.DriverFunction.IMPORT_DRIVER_TYPE`

## Field Summary

Fields
Modifier and Type
Field
Description
`static String`
`DESCRIPTION`

## Constructor Summary

Constructors
Constructor
Description
`SHPDriverFunction()`

## Method Summary

Modifier and Type
Method
Description
`String[]`
`exportTable(Connection connection, String tableReference, File fileName, boolean deleteFiles, org.h2gis.api.ProgressVisitor progress)`
`String[]`
`exportTable(Connection connection, String tableReference, File fileName, String options, boolean deleteFiles, org.h2gis.api.ProgressVisitor progress)`
`String[]`
`exportTable(Connection connection, String tableReference, File fileName, String encoding, org.h2gis.api.ProgressVisitor progress)`
Save a table or a query to a shpfile
`String[]`
`exportTable(Connection connection, String tableReference, File fileName, org.h2gis.api.ProgressVisitor progress)`
`String[]`
`getExportFormats()`
`String`
`getFormatDescription(String format)`
`org.h2gis.api.DriverFunction.IMPORT_DRIVER_TYPE`
`getImportDriverType()`
`String[]`
`getImportFormats()`
`String[]`
`importFile(Connection connection, String tableReference, File fileName, boolean deleteTables, org.h2gis.api.ProgressVisitor progress)`
`String[]`
`importFile(Connection connection, String tableReference, File fileName, String options, boolean deleteTables, org.h2gis.api.ProgressVisitor progress)`
`String[]`
`importFile(Connection connection, String tableReference, File fileName, String forceEncoding, org.h2gis.api.ProgressVisitor progress)`
`String[]`
`importFile(Connection connection, String tableReference, File fileName, org.h2gis.api.ProgressVisitor progress)`
`boolean`
`isSpatialFormat(String extension)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### DESCRIPTION

public static String DESCRIPTION

## Constructor Details

### SHPDriverFunction

public SHPDriverFunction()

## Method Details

### exportTable

public String[] exportTable(Connection connection, String tableReference, File fileName, org.h2gis.api.ProgressVisitor progress) throws SQLException, IOException

Specified by:
  `exportTable` in interface `org.h2gis.api.DriverFunction`
Throws:
  `SQLException`
  `IOException`

### exportTable

public String[] exportTable(Connection connection, String tableReference, File fileName, boolean deleteFiles, org.h2gis.api.ProgressVisitor progress) throws SQLException, IOException

Specified by:
  `exportTable` in interface `org.h2gis.api.DriverFunction`
Throws:
  `SQLException`
  `IOException`

### exportTable

public String[] exportTable(Connection connection, String tableReference, File fileName, String options, boolean deleteFiles, org.h2gis.api.ProgressVisitor progress) throws SQLException, IOException

Specified by:
  `exportTable` in interface `org.h2gis.api.DriverFunction`
Throws:
  `SQLException`
  `IOException`

### exportTable

public String[] exportTable(Connection connection, String tableReference, File fileName, String encoding, org.h2gis.api.ProgressVisitor progress) throws SQLException, IOException
Save a table or a query to a shpfile

Specified by:
  `exportTable` in interface `org.h2gis.api.DriverFunction`
Parameters:
  `connection` - Active connection, do not close this connection.
  `tableReference` - [[catalog.]schema.]table reference
  `fileName` - File path to write, if exists it may be replaced
  `encoding` - File encoding, null will use default encoding
  `progress` - to display the IO progress
Throws:
  `SQLException`
  `IOException`

### getFormatDescription

public String getFormatDescription(String format)

Specified by:
  `getFormatDescription` in interface `org.h2gis.api.DriverFunction`

### getImportDriverType

public org.h2gis.api.DriverFunction.IMPORT_DRIVER_TYPE getImportDriverType()

Specified by:
  `getImportDriverType` in interface `org.h2gis.api.DriverFunction`

### getImportFormats

public String[] getImportFormats()

Specified by:
  `getImportFormats` in interface `org.h2gis.api.DriverFunction`

### getExportFormats

public String[] getExportFormats()

Specified by:
  `getExportFormats` in interface `org.h2gis.api.DriverFunction`

### isSpatialFormat

public boolean isSpatialFormat(String extension)

Specified by:
  `isSpatialFormat` in interface `org.h2gis.api.DriverFunction`

### importFile

public String[] importFile(Connection connection, String tableReference, File fileName, org.h2gis.api.ProgressVisitor progress) throws SQLException, IOException

Specified by:
  `importFile` in interface `org.h2gis.api.DriverFunction`
Throws:
  `SQLException`
  `IOException`

### importFile

public String[] importFile(Connection connection, String tableReference, File fileName, String forceEncoding, org.h2gis.api.ProgressVisitor progress) throws SQLException, IOException

Specified by:
  `importFile` in interface `org.h2gis.api.DriverFunction`
Parameters:
  `connection` - Active connection, do not close this connection.
  `tableReference` - [[catalog.]schema.]table reference
  `fileName` - File path to read
  `forceEncoding` - If defined use this encoding instead of the one defined in dbf header.
  `progress` -
Throws:
  `SQLException` - Table write error
  `IOException` - File read error

### importFile

public String[] importFile(Connection connection, String tableReference, File fileName, boolean deleteTables, org.h2gis.api.ProgressVisitor progress) throws SQLException, IOException

Specified by:
  `importFile` in interface `org.h2gis.api.DriverFunction`
Throws:
  `SQLException`
  `IOException`

### importFile

public String[] importFile(Connection connection, String tableReference, File fileName, String options, boolean deleteTables, org.h2gis.api.ProgressVisitor progress) throws SQLException, IOException

Specified by:
  `importFile` in interface `org.h2gis.api.DriverFunction`
Throws:
  `SQLException`
  `IOException`