org.h2gis.functions.io.kml

## Class KMLWriterDriver

- java.lang.Object
- - org.h2gis.functions.io.kml.KMLWriterDriver

    public class KMLWriterDriver
    extends Object

Author:
  Erwan Bocher

### Constructor Summary

Constructors
Constructor and Description
`KMLWriterDriver(Connection connection, String tableName, File fileName)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `write(org.h2gis.api.ProgressVisitor progress)` Write spatial table to kml or kmz file format.
`void` `writeExtendedData(XMLStreamWriter xmlOut, ResultSet rs)` The ExtendedData element offers three techniques for adding custom data to a KML Feature (NetworkLink, Placemark, GroundOverlay, PhotoOverlay, ScreenOverlay, Document, Folder).
`void` `writePlacemark(XMLStreamWriter xmlOut, ResultSet rs, int geoFieldIndex, String spatialFieldName)` A Placemark is a Feature with associated Geometry.
`void` `writeSimpleData(XMLStreamWriter xmlOut, String columnName, String value)`

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

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

### Constructor Detail

#### KMLWriterDriver

    public KMLWriterDriver(Connection connection,
                           String tableName,
                           File fileName)

### Method Detail

#### write

    public void write(org.h2gis.api.ProgressVisitor progress)
               throws SQLException

Write spatial table to kml or kmz file format.

Parameters:
  `progress` -
Throws:
  `SQLException`

#### writePlacemark

    public void writePlacemark(XMLStreamWriter xmlOut,
                               ResultSet rs,
                               int geoFieldIndex,
                               String spatialFieldName)
                        throws XMLStreamException,
                               SQLException

A Placemark is a Feature with associated Geometry. Syntax : <name>...</name> <visibility>1</visibility> <open>0</open> ...
... <phoneNumber>...</phoneNumber> ... <description>...</description> <AbstractView>...</AbstractView> <TimePrimitive>...</TimePrimitive> <styleUrl>...</styleUrl> <StyleSelector>...</StyleSelector> <Region>...</Region> <Metadata>...</Metadata> <ExtendedData>...</ExtendedData> <Geometry>...</Geometry>

Parameters:
  `xmlOut` -
Throws:
  `XMLStreamException`
  `SQLException`

#### writeExtendedData

    public void writeExtendedData(XMLStreamWriter xmlOut,
                                  ResultSet rs)
                           throws XMLStreamException,
                                  SQLException

The ExtendedData element offers three techniques for adding custom data to a KML Feature (NetworkLink, Placemark, GroundOverlay, PhotoOverlay, ScreenOverlay, Document, Folder). These techniques are Adding untyped data/value pairs using the element (basic) Declaring new typed fields using the <Schema> element and then instancing them using the <SchemaData> element (advanced) Referring to XML elements defined in other namespaces by referencing the external namespace within the KML file (basic) These techniques can be combined within a single KML file or Feature for different pieces of data. Syntax : <ExtendedData> <displayName>...</displayName> <value>...</value> ... ... </ExtendedData>

Parameters:
  `xmlOut` -
Throws:
  `XMLStreamException`
  `SQLException`

#### writeSimpleData

    public void writeSimpleData(XMLStreamWriter xmlOut,
                                String columnName,
                                String value)
                         throws XMLStreamException

Parameters:
  `xmlOut` -
Throws:
  `XMLStreamException`