org.h2gis.drivers.shp
Class SHPWrite

java.lang.Object
  extended by org.h2gis.h2spatialapi.AbstractFunction
      extended by org.h2gis.drivers.shp.SHPWrite
All Implemented Interfaces:
Function, ScalarFunction

public class SHPWrite
extends AbstractFunction
implements ScalarFunction

SQL Function to read a table and write it into a shape file.

Author:
Nicolas Fortin

Field Summary
 
Fields inherited from interface org.h2gis.h2spatialapi.ScalarFunction
PROP_DETERMINISTIC, PROP_NOBUFFER
 
Fields inherited from interface org.h2gis.h2spatialapi.Function
PROP_NAME, PROP_REMARKS
 
Constructor Summary
SHPWrite()
           
 
Method Summary
static void exportTable(Connection connection, String fileName, String tableReference)
          Read a table and write it into a shape file.
static void exportTable(Connection connection, String fileName, String tableReference, String encoding)
          Read a table and write it into a shape file.
 String getJavaStaticMethod()
           
 
Methods inherited from class org.h2gis.h2spatialapi.AbstractFunction
addProperty, getProperty, removeProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.h2gis.h2spatialapi.Function
getProperty
 

Constructor Detail

SHPWrite

public SHPWrite()
Method Detail

getJavaStaticMethod

public String getJavaStaticMethod()
Specified by:
getJavaStaticMethod in interface ScalarFunction

exportTable

public static void exportTable(Connection connection,
                               String fileName,
                               String tableReference)
                        throws IOException,
                               SQLException
Read a table and write it into a shape file.

Parameters:
connection - Active connection
fileName - Shape file name or URI
tableReference - Table name
Throws:
IOException
SQLException

exportTable

public static void exportTable(Connection connection,
                               String fileName,
                               String tableReference,
                               String encoding)
                        throws IOException,
                               SQLException
Read a table and write it into a shape file.

Parameters:
connection - Active connection
fileName - Shape file name or URI
tableReference - Table name
encoding - File encoding
Throws:
IOException
SQLException


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