marble
tools/osm-addresses/OsmParser.cpp
Go to the documentation of this file.
182 void Way::setRegion( const QHash<int, Node> &database, const OsmRegionTree & tree, QList<OsmOsmRegion> & osmOsmRegions, OsmPlacemark &placemark ) const
196 qDebug() << "Creating a new implicit region from " << node.name << " at " << node.lon << "," << node.lat;
215 GeoDataCoordinates position( placemark.longitude(), placemark.latitude(), 0.0, GeoDataCoordinates::Degree );
262 qWarning() << "Step 3: Creating region hierarchies from" << m_osmOsmRegions.size() << "administrative boundaries";
273 for ( int level=m_osmOsmRegions[i].region.adminLevel()-1; level >= 0 && parent == 0; --level ) {
279 if ( parent == 0 || contains<GeoDataLinearRing, GeoDataLinearRing>( parent->region.geometry().outerBoundary(), outer ) ) {
280 qDebug() << "Parent found: " << m_osmOsmRegions[i].region.name() << ", level " << m_osmOsmRegions[i].region.adminLevel()
281 << "is a child of " << m_osmOsmRegions[j].region.name() << ", level " << m_osmOsmRegions[j].region.adminLevel();
293 int const parent = m_osmOsmRegions[i].parent ? m_osmOsmRegions[i].parent->region.identifier() : 0;
407 qWarning() << "Step 6: " << m_statistic.mergedWays << " ways merged," << m_statistic.uselessWays << "useless ways."
627 qDebug() << "Overwriting category " << element.category << " with " << m_categoryMap[term] << " for " << element.name;
689 ring->append(GeoDataCoordinates(points[i].coordinate.lon, points[i].coordinate.lat, 0.0, GeoDataCoordinates::Degree));
703 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
void clear()
Coordinate(float lon=0.0, float lat=0.0)
Definition: tools/osm-addresses/OsmParser.cpp:762
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:166
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:65
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
QList< T > values() const
void setCategory(Element &element, const QString &key, const QString &value)
Definition: tools/osm-addresses/OsmParser.cpp:622
iterator begin()
void push_back(const T &value)
QString name() const
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:703
Definition: tools/osm-addresses/OsmParser.h:79
GeoDataPoint * node(quint64 id)
Definition: src/plugins/runner/osm/OsmParser.cpp:71
A lightweight data structure to represent points of interest like addresses with support for serializ...
Definition: OsmPlacemark.h:24
const T & at(int i) const
QString fileName() const
void read(const QFileInfo &file, const QString &areaName)
Definition: tools/osm-addresses/OsmParser.cpp:219
void setCategory(OsmCategory category)
Definition: OsmPlacemark.cpp:28
void removeAt(int i)
Definition: OsmRegionTree.h:21
Definition: Writer.h:22
void setAlpha(int alpha)
Definition: OsmPlacemark.h:48
T & first()
a class to map different styles to one style
Definition: GeoDataStyleMap.h:38
GeoDataPolygon * polygon(quint64 id)
Definition: src/plugins/runner/osm/OsmParser.cpp:91
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
int size() const
bool moreImportantAdminArea(const OsmRegion &a, const OsmRegion b)
Definition: tools/osm-addresses/OsmParser.cpp:61
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
QList< Key > keys() const
const char * name() const
int elapsed() const
int count(const T &value) const
virtual const GeoDataLatLonAltBox & latLonAltBox() const
Returns the smallest latLonAltBox that contains the Polygon.
Definition: GeoDataPolygon.cpp:118
void setName(const QString &value)
Set a new name for this feature.
Definition: GeoDataFeature.cpp:549
QString fileName() const
bool isEmpty() const
bool isEmpty() const
QString trimmed() const
void remove(int i)
Standard Marble way of writing XML This class is intended to be a standardised way of writing XML for...
Definition: GeoWriter.h:29
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:134
QMap< Key, T >::iterator insert(const Key &key, const T &value)
T & first()
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
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:123
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:555
void setStyleUrl(const QString &value)
Set the styleUrl of this feature to value.
Definition: GeoDataFeature.cpp:631
const char * kmlTag_nameSpaceOgc22
Definition: KmlElementDictionary.cpp:34
iterator end()
void reserve(int size)
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:151
void setDocumentType(const QString &documentType)
Set the current document type.
Definition: GeoWriter.cpp:79
virtual void close()
unsigned int uselessWays
Definition: tools/osm-addresses/OsmParser.h:141
Definition: OsmPlacemark.h:41
Definition: OsmPlacemark.h:43
QString & replace(int position, int n, QChar after)
const T & at(int i) const
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
GeoDataLineString * way(quint64 id)
Definition: src/plugins/runner/osm/OsmParser.cpp:81
bool isEmpty() const
Returns whether the LineString has no nodes at all.
Definition: GeoDataLineString.cpp:133
void addValue(const GeoDataData &data)
add a data object to the GeoDataExtendedData with the key
Definition: GeoDataExtendedData.cpp:71
void setPosition(const QHash< int, Coordinate > &database, OsmPlacemark &placemark) const
Definition: tools/osm-addresses/OsmParser.cpp:151
bool isEmpty() const
T & last()
Definition: tools/osm-addresses/OsmParser.h:42
QSet< T > fromList(const QList< T > &list)
void setHouseNumber(const QString &houseNumber)
Definition: OsmPlacemark.cpp:48
void push_back(const T &value)
virtual void addOsmPlacemark(const OsmPlacemark &placemark)=0
void start()
iterator insert(const Key &key, const T &value)
bool contains(const Key &key) const
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:743
void addWriter(Writer *writer)
Definition: tools/osm-addresses/OsmParser.cpp:118
QObject * parent() const
int size() const
OsmPlacemark::OsmCategory category
Definition: tools/osm-addresses/OsmParser.h:58
iterator end()
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
iterator begin()
virtual const GeoDataLatLonAltBox & latLonAltBox() const
Returns the smallest latLonAltBox that contains the LineString.
Definition: GeoDataLineString.cpp:580
void setRegion(const QHash< int, Node > &database, const OsmRegionTree &tree, QList< OsmOsmRegion > &osmOsmRegions, OsmPlacemark &placemark) const
Definition: tools/osm-addresses/OsmParser.cpp:182
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:230
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.