marble
#include <GeoDataLinearRing.h>
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
|
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.
|
virtual |
Destroys a LinearRing.
Definition at line 31 of file GeoDataLinearRing.cpp.
Member Function Documentation
|
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.
|
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.
|
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.
|
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:
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.