Marble

KmlOsmPlacemarkDataTagWriter.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2015 Marius-Valeriu Stanciu <stanciumarius94@gmail.com>
4//
5
6#ifndef MARBLE_KMLOSMPLACEMARKDATATAGWRITER_H
7#define MARBLE_KMLOSMPLACEMARKDATATAGWRITER_H
8
9#include "GeoTagWriter.h"
10
11namespace Marble
12{
13
14class GeoDataFeature;
15class OsmPlacemarkData;
16class GeoDataGeometry;
17
18/**
19 * @brief The KmlOsmPlacemarkDataTagWriter class is not a standard GeoTagWriter extension
20 * because the osm data fields have to be written in relation to the placemark's geometry
21 */
23{
24public:
25 /**
26 * @brief write function writes a custom XML schema made to store
27 * OsmPlacemarkData in a valid KML context
28 * @see https://developers.google.com/kml/documentation/extendeddata#opaquedata
29 *
30 * The custom schema has the following structure ( most complex one, for polygons ):
31 *@code
32 *<Placemark>
33 * ...
34 * <ExtendedData xmlns:mx="http://marble.kde.org">
35 * <mx:OsmPlacemarkData id=...>
36 * <mx:tag k="key" v="value"/>
37 * .. more tags
38 *
39 * <mx:member index="-1"> //outer boundary
40 * <mx:OsmPlacemarkData id=...>
41 * <mx:nd index="0">
42 * <mx:OsmPlacemarkData id= .../> //nd #0
43 * </nd>
44 * <mx:nd index="1">
45 * <mx:OsmPlacemarkData id= .../> //nd #1
46 * </nd>
47 * ... more nds
48 * </member>
49 *
50 * <mx:member index="0"> //first inner boundary
51 * ...
52 * </member>
53 * ... more inner boundaries
54 *
55 * </mx:OsmPlacemarkData>
56 * </ExtendedData>
57 * </Placemark>
58 *@endcode
59 */
60 static bool write(const GeoDataFeature *feature, GeoWriter &writer);
61 static bool writeOsmData(const GeoDataGeometry *geometry, const OsmPlacemarkData &osmData, GeoWriter &writer);
62};
63
64}
65
66#endif
A base class for all geodata features.
A base class for all geodata features.
Standard Marble way of writing XML This class is intended to be a standardised way of writing XML for...
Definition GeoWriter.h:26
The KmlOsmPlacemarkDataTagWriter class is not a standard GeoTagWriter extension because the osm data ...
static bool write(const GeoDataFeature *feature, GeoWriter &writer)
write function writes a custom XML schema made to store OsmPlacemarkData in a valid KML context
This class is used to encapsulate the osm data fields kept within a placemark's extendedData.
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:37:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.