org.h2gis.drivers.geojson
Class GeoJsonWriteDriver

java.lang.Object
  extended by org.h2gis.drivers.geojson.GeoJsonWriteDriver

public class GeoJsonWriteDriver
extends Object

A simple GeoJSON driver to write a spatial table to a GeoJSON file. GeoJSON is a format for encoding a variety of geographic data structures. A GeoJSON object may represent a geometry, a feature, or a collection of features. GeoJSON supports the following geometry types: POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, and GEOMETRYCOLLECTION. Syntax: { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry":{"type": "Point", "coordinates": [102.0, 0.5]}, "properties": {"prop0": "value0"} } ]}

Author:
Erwan Bocher

Constructor Summary
GeoJsonWriteDriver(Connection connection, String tableName, File fileName)
          A simple GeoJSON driver to write a spatial table to a GeoJSON file.
 
Method Summary
 boolean isSupportedPropertyType(int sqlTypeId, String sqlTypeName)
          Return true is the SQL type is supported by the GeoJSON driver.
 void write(ProgressVisitor progress)
          Write the spatial table to GeoJSON format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoJsonWriteDriver

public GeoJsonWriteDriver(Connection connection,
                          String tableName,
                          File fileName)
A simple GeoJSON driver to write a spatial table to a GeoJSON file.

Parameters:
connection -
tableName -
fileName -
Method Detail

write

public void write(ProgressVisitor progress)
           throws SQLException,
                  IOException
Write the spatial table to GeoJSON format.

Parameters:
progress -
Throws:
SQLException
IOException

isSupportedPropertyType

public boolean isSupportedPropertyType(int sqlTypeId,
                                       String sqlTypeName)
                                throws SQLException
Return true is the SQL type is supported by the GeoJSON driver.

Parameters:
sqlTypeId -
sqlTypeName -
Returns:
Throws:
SQLException


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