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
48 enum polygonFlagType { LINESTRING = 0, LINEARRING = 1, OUTERBOUNDARY = 2, INNERBOUNDARY = 3, MULTIGEOMETRY = 4 };
76 bool Pn2Runner::importPolygon( QDataStream &stream, GeoDataLineString* linestring, quint32 nrAbsoluteNodes )
107 GeoDataCoordinates *currCoord = new GeoDataCoordinates( currDegLon / 180 * M_PI, currDegLat / 180 * M_PI );
148 for ( quint32 currentPoly = 1; ( currentPoly <= fileHeaderPolygons ) && ( !error ) && ( !stream.atEnd() ); currentPoly++ ) {
191 // 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:64
Definition: Pn2Runner.cpp:48
void setDocumentRole(DocumentRole role)
Definition: GeoDataDocument.cpp:62
A LinearRing that allows to store a closed, contiguous set of line segments.
Definition: GeoDataLinearRing.h:68
Definition: Pn2Runner.cpp:48
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:48
Definition: Pn2Runner.cpp:48
bool importPolygon(QDataStream &stream, GeoDataLineString *linestring, quint32 nrAbsoluteNodes)
Definition: Pn2Runner.cpp:76
void append(const GeoDataCoordinates &position)
Appends a given geodesic position as a new node to the LineString.
Definition: GeoDataLineString.cpp:221
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:111
Definition: Pn2Runner.cpp:48
void setFileName(const QString &value)
Set a new file name for this document.
Definition: GeoDataDocument.cpp:82
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:95
virtual void parseFile(const QString &fileName, DocumentRole role)
Start a file parsing.
Definition: Pn2Runner.cpp:115
void setGeometry(GeoDataGeometry *entry)
Sets the current Geometry of this Placemark.
Definition: GeoDataPlacemark.cpp:136
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.