marble
tools/osm-addresses/OsmParser.cpp
Go to the documentation of this file.
181 void Way::setRegion( const QHash<int, Node> &database, const OsmRegionTree & tree, QList<OsmOsmRegion> & osmOsmRegions, OsmPlacemark &placemark ) const
195 qDebug() << "Creating a new implicit region from " << node.name << " at " << node.lon << "," << node.lat;
214 GeoDataCoordinates position( placemark.longitude(), placemark.latitude(), 0.0, GeoDataCoordinates::Degree );
261 qWarning() << "Step 3: Creating region hierarchies from" << m_osmOsmRegions.size() << "administrative boundaries";
272 for ( int level=m_osmOsmRegions[i].region.adminLevel()-1; level >= 0 && parent == 0; --level ) {
278 if ( parent == 0 || contains<GeoDataLinearRing, GeoDataLinearRing>( parent->region.geometry().outerBoundary(), outer ) ) {
279 qDebug() << "Parent found: " << m_osmOsmRegions[i].region.name() << ", level " << m_osmOsmRegions[i].region.adminLevel()
280 << "is a child of " << m_osmOsmRegions[j].region.name() << ", level " << m_osmOsmRegions[j].region.adminLevel();
292 int const parent = m_osmOsmRegions[i].parent ? m_osmOsmRegions[i].parent->region.identifier() : 0;
406 qWarning() << "Step 6: " << m_statistic.mergedWays << " ways merged," << m_statistic.uselessWays << "useless ways."
626 qDebug() << "Overwriting category " << element.category << " with " << m_categoryMap[term] << " for " << element.name;
688 ring->append(GeoDataCoordinates(points[i].coordinate.lon, points[i].coordinate.lat, 0.0, GeoDataCoordinates::Degree));
702 void OsmParser::writeKml( const QString &area, const QString &version, const QString &date, const QString &transport, const QString &payload, const QString &filename ) const
virtual void addOsmRegion(const OsmRegion ®ion)=0
Coordinate(float lon=0.0, float lat=0.0)
Definition: tools/osm-addresses/OsmParser.cpp:761
QHash< int, Coordinate > m_coordinates
Definition: tools/osm-addresses/OsmParser.h:167
void addStyleMap(const GeoDataStyleMap &map)
Add a stylemap to the stylemap storage.
Definition: GeoDataDocument.cpp:137
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:64
A LinearRing that allows to store a closed, contiguous set of line segments.
Definition: GeoDataLinearRing.h:68
A lightweight data structure to represent administrative regions like villages, cities, states, ...
Definition: OsmRegion.h:26
Definition: OsmPlacemark.h:34
void setCategory(Element &element, const QString &key, const QString &value)
Definition: tools/osm-addresses/OsmParser.cpp:621
int smallestRegionId(const GeoDataCoordinates &coordinates) const
Definition: OsmRegionTree.cpp:82
void writeKml(const QString &area, const QString &version, const QString &date, const QString &transport, const QString &payload, const QString &outputKml) const
Definition: tools/osm-addresses/OsmParser.cpp:702
Definition: tools/osm-addresses/OsmParser.h:79
A lightweight data structure to represent points of interest like addresses with support for serializ...
Definition: OsmPlacemark.h:24
void read(const QFileInfo &file, const QString &areaName)
Definition: tools/osm-addresses/OsmParser.cpp:218
void setCategory(OsmCategory category)
Definition: OsmPlacemark.cpp:28
Definition: OsmRegionTree.h:21
Definition: Writer.h:22
Definition: OsmPlacemark.h:48
a class to map different styles to one style
Definition: GeoDataStyleMap.h:38
qreal latitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the latitude of the GeoDataCoordinates object use the unit parameter to switch between Radi...
Definition: GeoDataCoordinates.cpp:751
Definition: tools/osm-addresses/OsmParser.h:41
Definition: OsmPlacemark.h:39
bool moreImportantAdminArea(const OsmRegion &a, const OsmRegion b)
Definition: tools/osm-addresses/OsmParser.cpp:60
Represents a coordinate with the properties of a name and coordinates.
Definition: Coordinate.h:28
QHash< int, Relation > m_relations
Definition: tools/osm-addresses/OsmParser.h:173
virtual const GeoDataLatLonAltBox & latLonAltBox() const
Returns the smallest latLonAltBox that contains the Polygon.
Definition: GeoDataPolygon.cpp:80
void setName(const QString &value)
Set a new name for this feature.
Definition: GeoDataFeature.cpp:485
Standard Marble way of writing XML This class is intended to be a standardised way of writing XML for...
Definition: GeoWriter.h:28
Definition: tools/osm-addresses/OsmParser.h:71
Definition: OsmPlacemark.h:49
void addStyle(const GeoDataStyle &style)
Add a style to the style storage.
Definition: GeoDataDocument.cpp:110
qreal latitude() const
Latitude of the placemark's center point, in degree.
Definition: OsmPlacemark.cpp:83
GeoDataLinearRing & outerBoundary()
Returns the outer boundary that is represented as a LinearRing.
Definition: GeoDataPolygon.cpp:85
virtual GeoDataCoordinates center() const
returns the center of this box
Definition: GeoDataLatLonBox.cpp:276
bool shouldSave(ElementType type, const QString &key, const QString &value)
Definition: tools/osm-addresses/OsmParser.cpp:554
void setStyleUrl(const QString &value)
Set the styleUrl of this feature to value.
Definition: GeoDataFeature.cpp:556
qreal longitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the longitude of the GeoDataCoordinates object use the unit parameter to switch between Rad...
Definition: GeoDataCoordinates.cpp:739
virtual GeoDataCoordinates center() const
returns the center of this box
Definition: GeoDataLatLonAltBox.cpp:152
void setDocumentType(const QString &documentType)
Set the current document type.
Definition: GeoWriter.cpp:79
unsigned int uselessWays
Definition: tools/osm-addresses/OsmParser.h:141
Definition: OsmPlacemark.h:41
Definition: OsmPlacemark.h:43
qreal longitude() const
Longitude of the placemark's center point, in degree.
Definition: OsmPlacemark.cpp:73
Definition: GeoDataData.h:26
virtual bool parse(const QFileInfo &file, int pass, bool &needAnotherPass)=0
bool isEmpty() const
Returns whether the LineString has no nodes at all.
Definition: GeoDataLineString.cpp:129
void addValue(const GeoDataData &data)
add a data object to the GeoDataExtendedData with the key
Definition: GeoDataExtendedData.cpp:59
void setPosition(const QHash< int, Coordinate > &database, OsmPlacemark &placemark) const
Definition: tools/osm-addresses/OsmParser.cpp:150
Definition: tools/osm-addresses/OsmParser.h:42
void setHouseNumber(const QString &houseNumber)
Definition: OsmPlacemark.cpp:48
virtual void addOsmPlacemark(const OsmPlacemark &placemark)=0
bool write(QIODevice *device, const GeoNode *feature)
The main API call to use the XML writer.
Definition: GeoWriter.cpp:28
GeoDataExtendedData & extendedData() const
Return the ExtendedData assigned to the feature.
Definition: GeoDataFeature.cpp:653
void addWriter(Writer *writer)
Definition: tools/osm-addresses/OsmParser.cpp:117
OsmPlacemark::OsmCategory category
Definition: tools/osm-addresses/OsmParser.h:58
a class representing a point of interest on the map
Definition: GeoDataPlacemark.h:54
virtual const GeoDataLatLonAltBox & latLonAltBox() const
Returns the smallest latLonAltBox that contains the LineString.
Definition: GeoDataLineString.cpp:545
void setRegion(const QHash< int, Node > &database, const OsmRegionTree &tree, QList< OsmOsmRegion > &osmOsmRegions, OsmPlacemark &placemark) const
Definition: tools/osm-addresses/OsmParser.cpp:181
A class that defines a 2D bounding box for geographic data.
Definition: GeoDataLatLonBox.h:51
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.