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

marble

  • Marble
  • GeoDataLinearRing
Public Member Functions | List of all members
Marble::GeoDataLinearRing Class Reference

#include <GeoDataLinearRing.h>

Inheritance diagram for Marble::GeoDataLinearRing:
Inheritance graph
[legend]

Public Member Functions

 GeoDataLinearRing (TessellationFlags f=NoTessellation)
 
 GeoDataLinearRing (const GeoDataGeometry &other)
 
virtual ~GeoDataLinearRing ()
 
virtual bool contains (const GeoDataCoordinates &coordinates) const
 
virtual bool isClockwise () const
 
virtual bool isClosed () const
 
virtual qreal length (qreal planetRadius, int offset=0) const
 
bool operator!= (const GeoDataLinearRing &other) const
 
bool operator== (const GeoDataLinearRing &other) const
 
- Public Member Functions inherited from Marble::GeoDataLineString
 GeoDataLineString (TessellationFlags f=NoTessellation)
 
 GeoDataLineString (const GeoDataGeometry &other)
 
virtual ~GeoDataLineString ()
 
void append (const GeoDataCoordinates &position)
 
GeoDataCoordinates & at (int pos)
 
const GeoDataCoordinates & at (int pos) const
 
QVector< GeoDataCoordinates >
::Iterator 
begin ()
 
QVector< GeoDataCoordinates >
::ConstIterator 
begin () const
 
void clear ()
 
QVector< GeoDataCoordinates >
::ConstIterator 
constBegin () const
 
QVector< GeoDataCoordinates >
::ConstIterator 
constEnd () const
 
QVector< GeoDataCoordinates >
::Iterator 
end ()
 
QVector< GeoDataCoordinates >
::ConstIterator 
end () const
 
QVector< GeoDataCoordinates >
::Iterator 
erase (QVector< GeoDataCoordinates >::Iterator position)
 
QVector< GeoDataCoordinates >
::Iterator 
erase (QVector< GeoDataCoordinates >::Iterator begin, QVector< GeoDataCoordinates >::Iterator end)
 
GeoDataCoordinates & first ()
 
const GeoDataCoordinates & first () const
 
bool isEmpty () const
 
GeoDataCoordinates & last ()
 
const GeoDataCoordinates & last () const
 
virtual const GeoDataLatLonAltBox & latLonAltBox () const
 
bool operator!= (const GeoDataLineString &other) const
 
GeoDataLineString & operator<< (const GeoDataCoordinates &position)
 
GeoDataLineString & operator<< (const GeoDataLineString &lineString)
 
bool operator== (const GeoDataLineString &other) const
 
GeoDataCoordinates & operator[] (int pos)
 
const GeoDataCoordinates & operator[] (int pos) const
 
virtual void pack (QDataStream &stream) const
 
void remove (int i)
 
void setTessellate (bool tessellate)
 
void setTessellationFlags (TessellationFlags f)
 
int size () const
 
bool tessellate () const
 
TessellationFlags tessellationFlags () const
 
virtual QVector
< GeoDataLineString * > 
toDateLineCorrected () const
 
virtual GeoDataLineString toNormalized () const
 
virtual GeoDataLineString toPoleCorrected () const
 
virtual GeoDataLineString toRangeCorrected () const
 
virtual void unpack (QDataStream &stream)
 
- Public Member Functions inherited from Marble::GeoDataGeometry
 GeoDataGeometry ()
 
 GeoDataGeometry (const GeoDataGeometry &other)
 
virtual ~GeoDataGeometry ()
 
AltitudeMode altitudeMode () const
 
void detach ()
 
bool extrude () const
 
virtual EnumGeometryId geometryId () const
 
virtual const char * nodeType () const
 
GeoDataGeometry & operator= (const GeoDataGeometry &other)
 
void setAltitudeMode (const AltitudeMode altitudeMode)
 
void setExtrude (bool extrude)
 
- Public Member Functions inherited from Marble::GeoDataObject
 GeoDataObject ()
 
 GeoDataObject (const GeoDataObject &)
 
virtual ~GeoDataObject ()
 
QString id () const
 
GeoDataObject & operator= (const GeoDataObject &)
 
virtual GeoDataObject * parent () const
 
QString resolvePath (const QString &relativePath) const
 
void setId (const QString &value)
 
virtual void setParent (GeoDataObject *parent)
 
void setTargetId (const QString &value)
 
QString targetId () const
 
- Public Member Functions inherited from Marble::GeoNode
 GeoNode ()
 
virtual ~GeoNode ()
 
- Public Member Functions inherited from Marble::Serializable
virtual ~Serializable ()
 

Additional Inherited Members

- Public Types inherited from Marble::GeoDataLineString
typedef QVector
< GeoDataCoordinates >
::ConstIterator 
ConstIterator
 
typedef QVector
< GeoDataCoordinates >
::Iterator 
Iterator
 
- Protected Member Functions inherited from Marble::GeoDataLineString
 GeoDataLineString (GeoDataLineStringPrivate *priv)
 
- Protected Member Functions inherited from Marble::GeoDataGeometry
bool equals (const GeoDataGeometry &other) const
 
- Protected Member Functions inherited from Marble::GeoDataObject
virtual bool equals (const GeoDataObject &other) const
 

Detailed Description

A LinearRing that allows to store a closed, contiguous set of line segments.

GeoDataLinearRing is a tool class that implements the LinearRing tag/class of the Open Geospatial Consortium standard KML 2.2.

Unlike suggested in the KML spec GeoDataLinearRing extends GeoDataLineString to store a closed LineString (the KML specification suggests to inherit from the Geometry class directly).

In the QPainter API LinearRings are also referred to as "polygons". As such they are similar to QPolygons.

Whenever a LinearRing is painted GeoDataLineStyle should be used to assign a color and line width.

A GeoDataLinearRing consists of several (geodetic) nodes which are each connected through line segments. The nodes are stored as GeoDataCoordinates objects.

The API which provides access to the nodes is similar to the API of QVector.

GeoDataLinearRing allows LinearRings to be tessellated in order to make them follow the terrain and the curvature of the earth. The tessellation options allow for different ways of visualization:

  • Not tessellated: A LinearRing that connects each two nodes directly and straight in screen coordinate space.
  • A tessellated line: Each line segment is bent so that the LinearRing follows the curvature of the earth and its terrain. A tessellated line segment connects two nodes at the shortest possible distance ("along great circles").
  • A tessellated line that follows latitude circles whenever possible: In this case Latitude circles are followed as soon as two subsequent nodes have exactly the same amount of latitude. In all other places the line segments follow great circles.

Some convenience methods have been added that allow to calculate the geodesic bounding box or the length of a LinearRing.

Definition at line 68 of file GeoDataLinearRing.h.

Constructor & Destructor Documentation

Marble::GeoDataLinearRing::GeoDataLinearRing ( TessellationFlags  f = NoTessellation)
explicit

Creates a new LinearRing.

Definition at line 21 of file GeoDataLinearRing.cpp.

Marble::GeoDataLinearRing::GeoDataLinearRing ( const GeoDataGeometry &  other)

Creates a LinearRing from an existing geometry object.

Definition at line 26 of file GeoDataLinearRing.cpp.

Marble::GeoDataLinearRing::~GeoDataLinearRing ( )
virtual

Destroys a LinearRing.

Definition at line 31 of file GeoDataLinearRing.cpp.

Member Function Documentation

bool Marble::GeoDataLinearRing::contains ( const GeoDataCoordinates &  coordinates) const
virtual

Returns whether the given coordinates lie within the polygon.

Returns
true if the coordinates lie within the polygon, false otherwise.

Definition at line 58 of file GeoDataLinearRing.cpp.

bool Marble::GeoDataLinearRing::isClockwise ( ) const
virtual

Returns whether the orientaion of ring is coloskwise or not.

Returns
Return value is true if ring is clockwise orientated

Definition at line 86 of file GeoDataLinearRing.cpp.

bool Marble::GeoDataLinearRing::isClosed ( ) const
virtual

Returns whether a LinearRing is a closed polygon.

Returns
true for a LinearRing.

Reimplemented from Marble::GeoDataLineString.

Definition at line 46 of file GeoDataLinearRing.cpp.

qreal Marble::GeoDataLinearRing::length ( qreal  planetRadius,
int  offset = 0 
) const
virtual

Returns the length of the LinearRing across a sphere.

As a parameter the planetRadius needs to be passed.

Returns
The return value is the length of the LinearRing. The unit used for the resulting length matches the unit of the planet radius.

This method can be used as an approximation for the circumference of a LinearRing.

Reimplemented from Marble::GeoDataLineString.

Definition at line 51 of file GeoDataLinearRing.cpp.

bool Marble::GeoDataLinearRing::operator!= ( const GeoDataLinearRing &  other) const

Definition at line 41 of file GeoDataLinearRing.cpp.

bool Marble::GeoDataLinearRing::operator== ( const GeoDataLinearRing &  other) const

Returns true/false depending on whether this and other are/are not equal.

Definition at line 35 of file GeoDataLinearRing.cpp.


The documentation for this class was generated from the following files:
  • GeoDataLinearRing.h
  • GeoDataLinearRing.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:44 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