-
Notifications
You must be signed in to change notification settings - Fork 74
v0.2.49..v0.2.50 changeset HootApiDbReader.cpp
Garret Voltz edited this page Nov 6, 2019
·
1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/io/HootApiDbReader.cpp b/hoot-core/src/main/cpp/hoot/core/io/HootApiDbReader.cpp
index 40268e1..c25853b 100644
--- a/hoot-core/src/main/cpp/hoot/core/io/HootApiDbReader.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/io/HootApiDbReader.cpp
@@ -66,7 +66,7 @@ Envelope HootApiDbReader::calculateEnvelope() const
void HootApiDbReader::open(const QString& urlStr)
{
- _url = urlStr;
+ OsmMapReader::open(urlStr);
if (!isSupported(_url))
{
throw HootException("An unsupported URL was passed in to HootApiDbReader: " + _url);
@@ -95,6 +95,14 @@ void HootApiDbReader::open(const QString& urlStr)
_open = true;
}
+void HootApiDbReader::read(const OsmMapPtr &map)
+{
+ // Update the URL added to the map
+ _url = MetadataTags::HootApiDbScheme() + ":" + QString::number(_database->getMapId());
+ // Continue with the base class read operation
+ ApiDbReader::read(map);
+}
+
NodePtr HootApiDbReader::_resultToNode(const QSqlQuery& resultIterator, OsmMap& map)
{
long nodeId = _mapElementId(map, ElementId::node(resultIterator.value(0).toLongLong())).getId();