Marble::GeoDataLinearRing

Search for usage in LXR

Marble::GeoDataLinearRing Class Reference

#include <GeoDataLinearRing.h>

Inheritance diagram for Marble::GeoDataLinearRing:

Public Member Functions

 GeoDataLinearRing (TessellationFlags f=NoTessellation)
 
 GeoDataLinearRing (const GeoDataGeometry &other)
 
 ~GeoDataLinearRing () override
 
virtual bool contains (const GeoDataCoordinates &coordinates) const
 
GeoDataGeometrycopy () const override
 
EnumGeometryId geometryId () const override
 
virtual bool isClockwise () const
 
bool isClosed () const override
 
qreal length (qreal planetRadius, int offset=0) const override
 
const char * nodeType () const override
 
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)
 
 ~GeoDataLineString () override
 
void append (const GeoDataCoordinates &value)
 
void append (const QVector< GeoDataCoordinates > &values)
 
GeoDataCoordinatesat (int pos)
 
const GeoDataCoordinatesat (int pos) const
 
QVector< GeoDataCoordinates >::Iterator begin ()
 
QVector< GeoDataCoordinates >::ConstIterator begin () const
 
void clear ()
 
QVector< GeoDataCoordinates >::ConstIterator constBegin () const
 
QVector< GeoDataCoordinates >::ConstIterator constEnd () const
 
GeoDataGeometrycopy () const override
 
QVector< GeoDataCoordinates >::Iterator end ()
 
QVector< GeoDataCoordinates >::ConstIterator end () const
 
QVector< GeoDataCoordinates >::Iterator erase (const QVector< GeoDataCoordinates >::Iterator &position)
 
QVector< GeoDataCoordinates >::Iterator erase (const QVector< GeoDataCoordinates >::Iterator &begin, const QVector< GeoDataCoordinates >::Iterator &end)
 
GeoDataCoordinatesfirst ()
 
const GeoDataCoordinatesfirst () const
 
EnumGeometryId geometryId () const override
 
void insert (int index, const GeoDataCoordinates &value)
 
bool isEmpty () const
 
GeoDataCoordinateslast ()
 
const GeoDataCoordinateslast () const
 
const GeoDataLatLonAltBoxlatLonAltBox () const override
 
GeoDataLineString mid (int pos, int length=-1) const
 
const char * nodeType () const override
 
bool operator!= (const GeoDataLineString &other) const
 
GeoDataLineStringoperator<< (const GeoDataCoordinates &value)
 
GeoDataLineStringoperator<< (const GeoDataLineString &lineString)
 
bool operator== (const GeoDataLineString &other) const
 
GeoDataCoordinatesoperator[] (int pos)
 
const GeoDataCoordinatesoperator[] (int pos) const
 
GeoDataLineString optimized () const
 
void pack (QDataStream &stream) const override
 
void remove (int i)
 
void reserve (int size)
 
void reverse ()
 
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
 
QVariantList toVariantList () const
 
void unpack (QDataStream &stream) override
 
- Public Member Functions inherited from Marble::GeoDataGeometry
AltitudeMode altitudeMode () const
 
void detach ()
 
bool extrude () const
 
bool operator!= (const GeoDataGeometry &other) const
 
bool operator== (const GeoDataGeometry &other) const
 
void pack (QDataStream &stream) const override
 
void setAltitudeMode (const AltitudeMode altitudeMode)
 
void setExtrude (bool extrude)
 
void unpack (QDataStream &stream) override
 
- Public Member Functions inherited from Marble::GeoDataObject
 GeoDataObject (const GeoDataObject &)
 
QString id () const
 
GeoDataObjectoperator= (const GeoDataObject &)
 
void pack (QDataStream &stream) const override
 
const GeoDataObjectparent () const
 
GeoDataObjectparent ()
 
QString resolvePath (const QString &relativePath) const
 
void setId (const QString &value)
 
void setParent (GeoDataObject *parent)
 
void setTargetId (const QString &value)
 
QString targetId () const
 
void unpack (QDataStream &steam) override
 

Additional Inherited Members

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

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 62 of file GeoDataLinearRing.h.

Constructor & Destructor Documentation

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

Creates a new LinearRing.

Definition at line 16 of file GeoDataLinearRing.cpp.

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

Creates a LinearRing from an existing geometry object.

Definition at line 21 of file GeoDataLinearRing.cpp.

Marble::GeoDataLinearRing::~GeoDataLinearRing ( )
override

Destroys a LinearRing.

Definition at line 26 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 68 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 96 of file GeoDataLinearRing.cpp.

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

Returns whether a LinearRing is a closed polygon.

Returns
true for a LinearRing.

Reimplemented from Marble::GeoDataLineString.

Definition at line 56 of file GeoDataLinearRing.cpp.

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

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 61 of file GeoDataLinearRing.cpp.

const char * Marble::GeoDataLinearRing::nodeType ( ) const
overridevirtual

Provides type information for downcasting a GeoNode.

Implements Marble::GeoNode.

Definition at line 30 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 45 of file GeoDataLinearRing.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Oct 26 2021 23:21:27 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.