org.h2gis.functions.io.osm

## Class OSMDriverFunction

- java.lang.Object
- - org.h2gis.functions.io.osm.OSMDriverFunction

All Implemented Interfaces:
  org.h2gis.api.DriverFunction

    public class OSMDriverFunction
    extends Object
    implements org.h2gis.api.DriverFunction

Author:
  Erwan Bocher, 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
`static String` `DESCRIPTION`
`static String` `DESCRIPTION_BZ2`
`static String` `DESCRIPTION_GZ`

### Constructor Summary

Constructors
Constructor and Description
`OSMDriverFunction()`

### Method Summary

All Methods Instance Methods Concrete Methods
`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 options)`
`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, boolean deleteTables)`
`void` `importFile(Connection connection, String tableReference, File fileName, org.h2gis.api.ProgressVisitor progress, String options)`
`boolean` `isSpatialFormat(String extension)`

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

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

### Field Detail

#### DESCRIPTION

    public static String DESCRIPTION

#### DESCRIPTION_GZ

    public static String DESCRIPTION_GZ

#### DESCRIPTION_BZ2

    public static String DESCRIPTION_BZ2

### Constructor Detail

#### OSMDriverFunction

    public OSMDriverFunction()

### Method Detail

#### getImportDriverType

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

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

#### getExportFormats

    public String[] getExportFormats()

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

#### getFormatDescription

    public String getFormatDescription(String format)

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

#### isSpatialFormat

    public boolean isSpatialFormat(String extension)

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

#### exportTable

    public void 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 void exportTable(Connection connection,
                            String tableReference,
                            File fileName,
                            org.h2gis.api.ProgressVisitor progress,
                            String options)
                     throws SQLException,
                            IOException

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

#### importFile

    public void 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 void importFile(Connection connection,
                           String tableReference,
                           File fileName,
                           org.h2gis.api.ProgressVisitor progress,
                           String options)
                    throws SQLException,
                           IOException

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

#### importFile

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

Specified by:
  `importFile` in interface `org.h2gis.api.DriverFunction`
Parameters:
  `connection` - Active connection, do not close this connection.
  `tableReference` - prefix uses to store the OSM tables
  `fileName` - File path to read
  `progress` -
  `deleteTables` - true to delete the existing tables
Throws:
  `SQLException` - Table write error
  `IOException` - File read error

#### getImportFormats

    public String[] getImportFormats()

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