| 1 |
/****************************************************************************** |
| 2 |
* |
| 3 |
* Project: KML Translator |
| 4 |
* Purpose: Implements OGRLIBKMLDriver |
| 5 |
* Author: Brian Case, rush at winkey dot org |
| 6 |
* |
| 7 |
****************************************************************************** |
| 8 |
* Copyright (c) 2010, Brian Case |
| 9 |
* |
| 10 |
* SPDX-License-Identifier: MIT |
| 11 |
*****************************************************************************/ |
| 12 |
|
| 13 |
#ifndef OGR_LIBKML_GEOMETRY_H |
| 14 |
#define OGR_LIBKML_GEOMETRY_H |
| 15 |
|
| 16 |
#include "libkml_headers.h" |
| 17 |
|
| 18 |
/******************************************************************************* |
| 19 |
Function to write out a ogr geometry to km. |
| 20 |
|
| 21 |
args: |
| 22 |
poOgrGeom the ogr geometry |
| 23 |
extra used in recursion, just pass -1 |
| 24 |
poKmlFactory pointer to the libkml dom factory |
| 25 |
|
| 26 |
returns: |
| 27 |
ElementPtr to the geometry created |
| 28 |
|
| 29 |
*******************************************************************************/ |
| 30 |
|
| 31 |
kmldom::ElementPtr geom2kml(OGRGeometry *poOgrGeom, int extra, |
| 32 |
kmldom::KmlFactory *poKmlFactory); |
| 33 |
|
| 34 |
/****************************************************************************** |
| 35 |
Function to read a kml geometry and translate to ogr. |
| 36 |
|
| 37 |
Args: |
| 38 |
poKmlGeometry pointer to the kml geometry to translate |
| 39 |
poOgrSRS pointer to the spatial ref to set on the geometry |
| 40 |
|
| 41 |
Returns: |
| 42 |
pointer to the new ogr geometry object |
| 43 |
|
| 44 |
******************************************************************************/ |
| 45 |
|
| 46 |
OGRGeometry *kml2geom(kmldom::GeometryPtr poKmlGeometry, |
| 47 |
OGRSpatialReference *poOgrSRS); |
| 48 |
|
| 49 |
OGRGeometry *kml2geom_latlonbox(kmldom::LatLonBoxPtr poKmlLatLonBox, |
| 50 |
OGRSpatialReference *poOgrSRS); |
| 51 |
|
| 52 |
OGRGeometry *kml2geom_latlonquad(kmldom::GxLatLonQuadPtr poKmlLatLonQuad, |
| 53 |
OGRSpatialReference *poOgrSRS); |
| 54 |
|
| 55 |
#endif // OGR_LIBKML_GEOMETRY_H |