• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • marble
  • geodata
  • writers
  • kml
KmlLatLonAltBoxWriter.cpp
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2012 Mayank Madan <maddiemadan@gmail.com>
9 //
10 
11 #include "KmlLatLonAltBoxWriter.h"
12 
13 #include "GeoDataLatLonAltBox.h"
14 #include "GeoDataTypes.h"
15 #include "GeoWriter.h"
16 #include "GeoTagWriter.h"
17 #include "KmlGroundOverlayWriter.h"
18 #include "KmlElementDictionary.h"
19 #include "KmlObjectTagWriter.h"
20 
21 namespace Marble
22 {
23 
24 static GeoTagWriterRegistrar s_writerLatLonAltBox(
25  GeoTagWriter::QualifiedName( GeoDataTypes::GeoDataLatLonAltBoxType,
26  kml::kmlTag_nameSpaceOgc22 ),
27  new KmlLatLonAltBoxWriter);
28 
29 bool KmlLatLonAltBoxWriter::write( const GeoNode *node,
30  GeoWriter& writer ) const
31 {
32  const GeoDataLatLonAltBox *latLonAltBox = static_cast<const GeoDataLatLonAltBox*>( node );
33  writer.writeStartElement(kml::kmlTag_LatLonAltBox);
34  KmlObjectTagWriter::writeIdentifiers( writer, latLonAltBox );
35  writer.writeTextElement( kml::kmlTag_north, QString::number(latLonAltBox->north( GeoDataCoordinates::Degree )) );
36  writer.writeTextElement( kml::kmlTag_south, QString::number(latLonAltBox->south( GeoDataCoordinates::Degree )) );
37  writer.writeTextElement( kml::kmlTag_east, QString::number(latLonAltBox->east( GeoDataCoordinates::Degree )) );
38  writer.writeTextElement( kml::kmlTag_west, QString::number(latLonAltBox->west( GeoDataCoordinates::Degree )) );
39  writer.writeTextElement( kml::kmlTag_minAltitude, QString::number(latLonAltBox->minAltitude()) );
40  writer.writeTextElement( kml::kmlTag_maxAltitude, QString::number(latLonAltBox->maxAltitude()) );
41  KmlGroundOverlayWriter::writeAltitudeMode( writer, latLonAltBox->altitudeMode());
42  writer.writeEndElement();
43  return true;
44 }
45 
46 }
Marble::KmlGroundOverlayWriter::writeAltitudeMode
static void writeAltitudeMode(GeoWriter &writer, AltitudeMode altitudeMode)
Definition: KmlGroundOverlayWriter.cpp:71
KmlObjectTagWriter.h
GeoTagWriter.h
Marble::GeoNode
A shared base class for all classes that are mapped to a specific tag (ie.
Definition: GeoDocument.h:60
Marble::kml::kmlTag_north
const char * kmlTag_north
Definition: KmlElementDictionary.cpp:130
Marble::GeoDataLatLonAltBox::altitudeMode
AltitudeMode altitudeMode() const
Get the reference system for the altitude.
Definition: GeoDataLatLonAltBox.cpp:146
KmlGroundOverlayWriter.h
Marble::kml::kmlTag_maxAltitude
const char * kmlTag_maxAltitude
Definition: KmlElementDictionary.cpp:112
Marble::kml::kmlTag_west
const char * kmlTag_west
Definition: KmlElementDictionary.cpp:199
Marble::GeoDataCoordinates::Degree
Definition: GeoDataCoordinates.h:66
Marble::KmlObjectTagWriter::writeIdentifiers
static void writeIdentifiers(GeoWriter &writer, const GeoDataObject *object)
Parses the id and targetId attributes and assign their values to the given object.
Definition: KmlObjectTagWriter.cpp:15
GeoWriter.h
Marble::GeoDataLatLonBox::north
qreal north(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
Get the northern boundary of the bounding box.
Definition: GeoDataLatLonBox.cpp:93
Marble::GeoDataLatLonBox::east
qreal east(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
Get the eastern boundary of the bounding box.
Definition: GeoDataLatLonBox.cpp:135
QString::number
QString number(int n, int base)
Marble::kml::kmlTag_LatLonAltBox
const char * kmlTag_LatLonAltBox
Definition: KmlElementDictionary.cpp:95
KmlElementDictionary.h
Marble::GeoWriter
Standard Marble way of writing XML This class is intended to be a standardised way of writing XML for...
Definition: GeoWriter.h:29
Marble::GeoTagWriter::QualifiedName
QPair< QString, QString > QualifiedName
Object Name and Namespace Pair This type is intended to be used in a similar way to.
Definition: GeoTagWriter.h:48
KmlLatLonAltBoxWriter.h
Marble::GeoDataLatLonAltBox::maxAltitude
qreal maxAltitude() const
Get the upper altitude boundary of the bounding box.
Definition: GeoDataLatLonAltBox.cpp:136
Marble::GeoDataTypes::GeoDataLatLonAltBoxType
const char * GeoDataLatLonAltBoxType
Definition: GeoDataTypes.cpp:49
Marble::kml::kmlTag_nameSpaceOgc22
const char * kmlTag_nameSpaceOgc22
Definition: KmlElementDictionary.cpp:34
Marble::GeoDataLatLonBox::west
qreal west(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
Get the western boundary of the bounding box.
Definition: GeoDataLatLonBox.cpp:156
Marble::kml::kmlTag_minAltitude
const char * kmlTag_minAltitude
Definition: KmlElementDictionary.cpp:120
GeoDataLatLonAltBox.h
Marble::kml::kmlTag_south
const char * kmlTag_south
Definition: KmlElementDictionary.cpp:173
Marble::GeoDataLatLonBox::south
qreal south(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
Get the southern boundary of the bounding box.
Definition: GeoDataLatLonBox.cpp:114
QXmlStreamWriter::writeTextElement
void writeTextElement(const QString &qualifiedName, const QString &text)
Marble::KmlLatLonAltBoxWriter::write
virtual bool write(const GeoNode *node, GeoWriter &writer) const
Definition: KmlLatLonAltBoxWriter.cpp:29
Marble::kml::kmlTag_east
const char * kmlTag_east
Definition: KmlElementDictionary.cpp:64
Marble::s_writerLatLonAltBox
static GeoTagWriterRegistrar s_writerLatLonAltBox(GeoTagWriter::QualifiedName(GeoDataTypes::GeoDataLatLonAltBoxType, kml::kmlTag_nameSpaceOgc22), new KmlLatLonAltBoxWriter)
GeoDataTypes.h
Marble::GeoDataLatLonAltBox
A class that defines a 3D bounding box for geographic data.
Definition: GeoDataLatLonAltBox.h:49
Marble::GeoDataLatLonAltBox::minAltitude
qreal minAltitude() const
Get the lower altitude boundary of the bounding box.
Definition: GeoDataLatLonAltBox.cpp:126
QXmlStreamWriter::writeEndElement
void writeEndElement()
QXmlStreamWriter::writeStartElement
void writeStartElement(const QString &qualifiedName)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal