org.h2gis.drivers.geojson
Class GeoJsonReaderDriver

java.lang.Object
  extended by org.h2gis.drivers.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

Constructor Summary
GeoJsonReaderDriver(Connection connection, String tableName, File fileName)
          Driver to import a GeoJSON file into a spatial table.
 
Method Summary
 void read(ProgressVisitor progress)
          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,
                           String tableName,
                           File fileName)
Driver to import a GeoJSON file into a spatial table.

Parameters:
connection -
tableName -
fileName -
Method Detail

read

public void read(ProgressVisitor progress)
          throws SQLException,
                 IOException
Read the GeoJSON file.

Parameters:
progress -
Throws:
SQLException
IOException


Copyright © 2015 IRSTV CNRS-FR-2488. All Rights Reserved.