| 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_STYLE_H |
| 14 |
#define OGR_LIBKML_STYLE_H |
| 15 |
|
| 16 |
#include <string> |
| 17 |
|
| 18 |
kmldom::StylePtr addstylestring2kml(const char *stylestring, |
| 19 |
kmldom::StylePtr poKmlStyle, |
| 20 |
kmldom::KmlFactory *poKmlFactory, |
| 21 |
kmldom::FeaturePtr poKmlFeature); |
| 22 |
|
| 23 |
/****************************************************************************** |
| 24 |
kml2stylemgr |
| 25 |
******************************************************************************/ |
| 26 |
|
| 27 |
void kml2stylestring(kmldom::StylePtr poKmlStyle, OGRStyleMgr *poOgrSM); |
| 28 |
|
| 29 |
/****************************************************************************** |
| 30 |
Functions to follow the kml stylemap if one exists. |
| 31 |
******************************************************************************/ |
| 32 |
|
| 33 |
kmldom::StyleSelectorPtr |
| 34 |
StyleFromStyleSelector(const kmldom::StyleSelectorPtr &styleselector, |
| 35 |
OGRStyleTable *poStyleTable); |
| 36 |
|
| 37 |
kmldom::StyleSelectorPtr StyleFromStyleURL(const std::string &styleurl, |
| 38 |
OGRStyleTable *poStyleTable); |
| 39 |
|
| 40 |
kmldom::StyleSelectorPtr StyleFromStyleMap(const kmldom::StyleMapPtr &stylemap, |
| 41 |
OGRStyleTable *poStyleTable); |
| 42 |
|
| 43 |
/****************************************************************************** |
| 44 |
Function to parse a style table out of a document. |
| 45 |
******************************************************************************/ |
| 46 |
|
| 47 |
void ParseStyles(kmldom::DocumentPtr poKmlDocument, |
| 48 |
OGRStyleTable **poStyleTable); |
| 49 |
|
| 50 |
/****************************************************************************** |
| 51 |
function to add a style table to a kml container |
| 52 |
******************************************************************************/ |
| 53 |
|
| 54 |
void styletable2kml(OGRStyleTable *poOgrStyleTable, |
| 55 |
kmldom::KmlFactory *poKmlFactory, |
| 56 |
kmldom::ContainerPtr poKmlContainer, |
| 57 |
CSLConstList papszOptions = nullptr); |
| 58 |
|
| 59 |
/****************************************************************************** |
| 60 |
Function to add a ListStyle and select it to a container. |
| 61 |
******************************************************************************/ |
| 62 |
|
| 63 |
void createkmlliststyle(kmldom::KmlFactory *poKmlFactory, |
| 64 |
const char *pszBaseName, |
| 65 |
kmldom::ContainerPtr poKmlLayerContainer, |
| 66 |
kmldom::DocumentPtr poKmlDocument, |
| 67 |
const CPLString &osListStyleType, |
| 68 |
const CPLString &osListStyleIconHref); |
| 69 |
|
| 70 |
#endif // OGR_LIBKML_STYLE_H |