Package org.h2gis.functions.io.geojson
Class GeoJsonReaderDriver
java.lang.Object
org.h2gis.functions.io.geojson.GeoJsonReaderDriver
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
ConstructorsConstructorDescriptionGeoJsonReaderDriver(Connection connection, File fileName, String encoding, boolean deleteTable) Driver to import a GeoJSON file into a spatial table. -
Method Summary
-
Constructor Details
-
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 Details
-
read
public String read(org.h2gis.api.ProgressVisitor progress, String tableReference) throws SQLException, IOException Read the GeoJSON file.- Parameters:
progress-tableReference-- Returns:
- Throws:
SQLExceptionIOException
-