Package org.h2gis.functions.io.geojson

## Class GeoJsonReaderDriver

- java.lang.Object
- - org.h2gis.functions.io.geojson.GeoJsonReaderDriver

    public class GeoJsonReaderDriver
    extends Object

Driver to import a GeoJSON file into a spatial table. Supported geometries are POINT, LINESTRING, POLYGON and GEOMETRYCOLLECTION. The driver requires all Feature objects in a collection to have the same schema of properties. To build the table schema the first feature of the FeatureCollection is parsed. If the GeoJSON format does not contain any properties, a default primary key is added.

Author:
  Erwan Bocher, Hai Trung Pham

### Constructor Summary

Constructors
`GeoJsonReaderDriver​(Connection connection, File fileName, String encoding, boolean deleteTable)` Driver to import a GeoJSON file into a spatial table.

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `read​(org.h2gis.api.ProgressVisitor progress, String tableReference)` Read the GeoJSON file.

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

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

### Constructor Detail

#### GeoJsonReaderDriver

    public GeoJsonReaderDriver​(Connection connection,
                               File fileName,
                               String encoding,
                               boolean deleteTable)

Driver to import a GeoJSON file into a spatial table.

Parameters:
  `connection` -
  `fileName` -
  `encoding` -
  `deleteTable` -

### Method Detail

#### read

    public String read​(org.h2gis.api.ProgressVisitor progress,
                       String tableReference)
                throws SQLException,
                       IOException

Read the GeoJSON file.

Parameters:
  `progress` -
  `tableReference` -
Returns:
Throws:
  `SQLException`
  `IOException`