marble
Pn2Runner.cpp
Go to the documentation of this file.
9 // For the Natural Earth Layer providing the Default data set at 0.5 arcminute resolution should be enough.
10 // This fileformat allows for even better packed data than the PNT format. For detailed polygons at arcminute
15 // In the fileformat initially a file header is provided that provides the file format version and the number
16 // of polygons stored inside the file. A Polygon starts with the Polygon Header which provides the feature id
17 // and the number of so called "absolute nodes" that are about to follow. Absolute nodes always contain
18 // absolute geodetic coordinates. The Polygon Header also provides a flag that allows to specify whether the
19 // polygon is supposed to represent a line string ("0") or a linear ring ("1"). Each absolute node can be followed
20 // by relative nodes: These relative nodes are always nodes that follow in correct order inside the polygon after
21 // "their" absolute node. Each absolute node specifies the number of relative nodes which contain relative
22 // coordinates in reference to their absolute node. So an absolute node provides the absolute reference for
23 // relative nodes across a theoretical area of 2x2 squaredegree-area (which in practice frequently might rather
26 // So much of the compression works by just referencing lat/lon diffs to special "absolute nodes". Hence the
50 enum polygonFlagType { LINESTRING = 0, LINEARRING = 1, OUTERBOUNDARY = 2, INNERBOUNDARY = 3, MULTIGEOMETRY = 4 };
78 bool Pn2Runner::importPolygon( QDataStream &stream, GeoDataLineString* linestring, quint32 nrAbsoluteNodes )
109 GeoDataCoordinates *currCoord = new GeoDataCoordinates( currDegLon / 180 * M_PI, currDegLat / 180 * M_PI );
152 for ( quint32 currentPoly = 1; ( currentPoly <= fileHeaderPolygons ) && ( !error ) && ( !stream.atEnd() ); currentPoly++ ) {
210 // not implemented yet, for now elements inside a multigeometry are separated as individual geometries
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:65
Definition: Pn2Runner.cpp:50
void setDocumentRole(DocumentRole role)
Definition: GeoDataDocument.cpp:86
A LinearRing that allows to store a closed, contiguous set of line segments.
Definition: GeoDataLinearRing.h:68
Definition: Pn2Runner.cpp:50
bool exists() const
Definition: GeoDataDocument.h:40
void parsingFinished(GeoDataDocument *document, const QString &error=QString())
File parsing is finished, result in the given document object.
Definition: Pn2Runner.cpp:50
Definition: Pn2Runner.cpp:50
static bool importPolygon(QDataStream &stream, GeoDataLineString *linestring, quint32 nrAbsoluteNodes)
Definition: Pn2Runner.cpp:78
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
bool atEnd() const
void append(const GeoDataCoordinates &position)
Appends a given geodesic position as a new node to the LineString.
Definition: GeoDataLineString.cpp:225
A LineString that allows to store a contiguous set of line segments.
Definition: GeoDataLineString.h:75
Definition: ParsingRunner.h:23
void appendInnerBoundary(const GeoDataLinearRing &boundary)
Appends a given LinearRing as an inner boundary of the Polygon.
Definition: GeoDataPolygon.cpp:149
Definition: Pn2Runner.cpp:50
QString suffix() const
void setFileName(const QString &value)
Set a new file name for this document.
Definition: GeoDataDocument.cpp:106
void setStyle(GeoDataStyle *style)
Sets the style of the placemark.
Definition: GeoDataFeature.cpp:735
specifies the style how polygons are drawn
Definition: GeoDataPolyStyle.h:34
int compare(const QString &other) const
a class representing a point of interest on the map
Definition: GeoDataPlacemark.h:54
void setOuterBoundary(const GeoDataLinearRing &boundary)
Sets the given LinearRing as an outer boundary of the Polygon.
Definition: GeoDataPolygon.cpp:133
virtual void parseFile(const QString &fileName, DocumentRole role)
Start a file parsing.
Definition: Pn2Runner.cpp:117
void setGeometry(GeoDataGeometry *entry)
Sets the current Geometry of this Placemark.
Definition: GeoDataPlacemark.cpp:230
void setColorIndex(quint8 colorIndex)
Set the color index which will be used to assign color to brush.
Definition: GeoDataPolyStyle.cpp:120
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.