org.h2gis.functions.io.kml

## Class KMLGeometry

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

    public class KMLGeometry
    extends Object

Tools to convert JTS geometry to KML representation

Author:
  Erwan Bocher

### Method Summary

All Methods Static Methods Concrete Methods
`static void` `appendKMLCoordinates(com.vividsolutions.jts.geom.Coordinate[] coords, StringBuilder sb)` Build a string represention to kml coordinates Syntax : <coordinates>...
`static void` `toKMLGeometry(com.vividsolutions.jts.geom.Geometry geometry, ExtrudeMode extrude, int altitudeModeEnum, StringBuilder sb)` Convert JTS geometry to a kml geometry representation.
`static void` `toKMLGeometry(com.vividsolutions.jts.geom.Geometry geom, StringBuilder sb)` Convert JTS geometry to a kml geometry representation.
`static void` `toKMLLinearRing(com.vividsolutions.jts.geom.LineString lineString, ExtrudeMode extrude, int altitudeModeEnum, StringBuilder sb)` Defines a closed line string, typically the outer boundary of a Polygon.
`static void` `toKMLLineString(com.vividsolutions.jts.geom.LineString lineString, ExtrudeMode extrude, int altitudeModeEnum, StringBuilder sb)` Defines a connected set of line segments.
`static void` `toKMLMultiGeometry(com.vividsolutions.jts.geom.GeometryCollection gc, ExtrudeMode extrude, int altitudeModeEnum, StringBuilder sb)` A container for zero or more geometry primitives associated with the same feature.
`static void` `toKMLPoint(com.vividsolutions.jts.geom.Point point, ExtrudeMode extrude, int altitudeModeEnum, StringBuilder sb)` A geographic location defined by longitude, latitude, and (optional) altitude.
`static void` `toKMLPolygon(com.vividsolutions.jts.geom.Polygon polygon, ExtrudeMode extrude, int altitudeModeEnum, StringBuilder sb)` A Polygon is defined by an outer boundary and 0 or more inner boundaries.

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

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

### Method Detail

#### toKMLGeometry

    public static void toKMLGeometry(com.vividsolutions.jts.geom.Geometry geom,
                                     StringBuilder sb)
                              throws SQLException

Convert JTS geometry to a kml geometry representation.

Parameters:
  `geom` -
  `sb` -
Throws:
  `SQLException`

#### toKMLGeometry

    public static void toKMLGeometry(com.vividsolutions.jts.geom.Geometry geometry,
                                     ExtrudeMode extrude,
                                     int altitudeModeEnum,
                                     StringBuilder sb)
                              throws SQLException

Convert JTS geometry to a kml geometry representation.

Parameters:
  `geometry` -
  `extrude` -
  `altitudeModeEnum` -
  `sb` -
Throws:
  `SQLException`

#### toKMLPoint

    public static void toKMLPoint(com.vividsolutions.jts.geom.Point point,
                                  ExtrudeMode extrude,
                                  int altitudeModeEnum,
                                  StringBuilder sb)

A geographic location defined by longitude, latitude, and (optional) altitude. Syntax : <extrude>0</extrude> <altitudeMode>clampToGround</altitudeMode> <coordinates>...</coordinates> Supported syntax : <Point> <extrude>0</extrude> <altitudeMode>clampToGround</altitudeMode> <coordinates>...</coordinates>

Parameters:
  `point` -
  `extrude` -
  `altitudeModeEnum` -

#### toKMLLineString

    public static void toKMLLineString(com.vividsolutions.jts.geom.LineString lineString,
                                       ExtrudeMode extrude,
                                       int altitudeModeEnum,
                                       StringBuilder sb)

Defines a connected set of line segments. Syntax : 0 <extrude>0</extrude> <tessellate>0</tessellate> <altitudeMode>clampToGround</altitudeMode> 0 <coordinates>...</coordinates> Supported syntax : <LineString> <extrude>0</extrude> <altitudeMode>clampToGround</altitudeMode> <coordinates>...</coordinates>

Parameters:
  `lineString` -

#### toKMLLinearRing

    public static void toKMLLinearRing(com.vividsolutions.jts.geom.LineString lineString,
                                       ExtrudeMode extrude,
                                       int altitudeModeEnum,
                                       StringBuilder sb)

Defines a closed line string, typically the outer boundary of a Polygon. Syntax : 0 <extrude>0</extrude> <tessellate>0</tessellate> <altitudeMode>clampToGround</altitudeMode> <coordinates>...</coordinates> Supported syntax : <LinearRing> <extrude>0</extrude> <altitudeMode>clampToGround</altitudeMode> <coordinates>...</coordinates>

Parameters:
  `lineString` -

#### toKMLPolygon

    public static void toKMLPolygon(com.vividsolutions.jts.geom.Polygon polygon,
                                    ExtrudeMode extrude,
                                    int altitudeModeEnum,
                                    StringBuilder sb)

A Polygon is defined by an outer boundary and 0 or more inner boundaries. The boundaries, in turn, are defined by LinearRings. Syntax : <extrude>0</extrude> <tessellate>0</tessellate> <altitudeMode>clampToGround</altitudeMode> <outerBoundaryIs> <LinearRing> <coordinates>...</coordinates> </outerBoundaryIs> <innerBoundaryIs> <LinearRing> <coordinates>...</coordinates> </innerBoundaryIs> Supported syntax : <Polygon> <extrude>0</extrude> <altitudeMode>clampToGround</altitudeMode> <outerBoundaryIs> <LinearRing> <coordinates>...</coordinates> </outerBoundaryIs> <innerBoundaryIs> <LinearRing> <coordinates>...</coordinates> </innerBoundaryIs>

Parameters:
  `polygon` -

#### toKMLMultiGeometry

    public static void toKMLMultiGeometry(com.vividsolutions.jts.geom.GeometryCollection gc,
                                          ExtrudeMode extrude,
                                          int altitudeModeEnum,
                                          StringBuilder sb)

A container for zero or more geometry primitives associated with the same feature.

Parameters:
  `gc` -

#### appendKMLCoordinates

    public static void appendKMLCoordinates(com.vividsolutions.jts.geom.Coordinate[] coords,
                                            StringBuilder sb)

Build a string represention to kml coordinates Syntax : <coordinates>...</coordinates>

Parameters:
  `coords` -