diff --git a/include/osm2rdf/config/Config.h b/include/osm2rdf/config/Config.h index 427627df..422b6f7c 100644 --- a/include/osm2rdf/config/Config.h +++ b/include/osm2rdf/config/Config.h @@ -48,6 +48,7 @@ struct Config { bool noFacts = false; bool noAreaFacts = false; + bool noChangesetFacts = false; bool noNodeFacts = false; bool noRelationFacts = false; bool noWayFacts = false; diff --git a/include/osm2rdf/config/Constants.h b/include/osm2rdf/config/Constants.h index 83ec028e..a07dd0b8 100644 --- a/include/osm2rdf/config/Constants.h +++ b/include/osm2rdf/config/Constants.h @@ -124,6 +124,15 @@ const static inline std::string NO_AREA_GEOM_RELATIONS_OPTION_LONG = const static inline std::string NO_AREA_GEOM_RELATIONS_OPTION_HELP = "Do not dump area geometric relations"; +const static inline std::string NO_CHANGESET_OPTION_SHORT = ""; +const static inline std::string NO_CHANGESET_OPTION_LONG = "no-changesets"; +const static inline std::string NO_CHANGESET_OPTION_HELP = "Ignore changesets"; +const static inline std::string NO_CHANGESET_FACTS_INFO = "Ignoring changeset facts"; +const static inline std::string NO_CHANGESET_FACTS_OPTION_SHORT = ""; +const static inline std::string NO_CHANGESET_FACTS_OPTION_LONG = "no-changeset-facts"; +const static inline std::string NO_CHANGESET_FACTS_OPTION_HELP = + "Do not dump changeset facts"; + const static inline std::string NO_NODE_OPTION_SHORT = ""; const static inline std::string NO_NODE_OPTION_LONG = "no-nodes"; const static inline std::string NO_NODE_OPTION_HELP = "Ignore nodes"; diff --git a/include/osm2rdf/osm/Changeset.h b/include/osm2rdf/osm/Changeset.h new file mode 100644 index 00000000..709d8568 --- /dev/null +++ b/include/osm2rdf/osm/Changeset.h @@ -0,0 +1,39 @@ +// Copyright 2024, University of Freiburg +// Authors: Axel Lehmann . + +// This file is part of osm2rdf. +// +// osm2rdf is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// osm2rdf is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with osm2rdf. If not, see . + +#ifndef OSM2RDF_OSM_CHANGESET_H_ +#define OSM2RDF_OSM_CHANGESET_H_ + +#include "osmium/osm/changeset.hpp" + +namespace osm2rdf::osm { + +class Changeset { + public: + typedef uint32_t id_t; + Changeset(); + explicit Changeset(const osmium::Changeset& changeset); + [[nodiscard]] id_t id() const noexcept; + + protected: + id_t _id; +}; + +} // namespace osm2rdf::osm + +#endif // OSM2RDF_OSM_CHANGESET_H_ diff --git a/include/osm2rdf/osm/CountHandler.h b/include/osm2rdf/osm/CountHandler.h index 17657a59..efb59166 100644 --- a/include/osm2rdf/osm/CountHandler.h +++ b/include/osm2rdf/osm/CountHandler.h @@ -26,16 +26,19 @@ namespace osm2rdf::osm { class CountHandler : public osmium::handler::Handler { public: + void changeset(const osmium::Changeset& changeset); void node(const osmium::Node& node); void relation(const osmium::Relation& relation); void way(const osmium::Way& way); void prepare_for_lookup(); - size_t numNodes() const; - size_t numRelations() const; - size_t numWays() const; + [[nodiscard]] size_t numChangesets() const; + [[nodiscard]] size_t numNodes() const; + [[nodiscard]] size_t numRelations() const; + [[nodiscard]] size_t numWays() const; protected: + size_t _numChangesets = 0; size_t _numNodes = 0; size_t _numRelations = 0; size_t _numWays = 0; diff --git a/include/osm2rdf/osm/FactHandler.h b/include/osm2rdf/osm/FactHandler.h index 45604a75..28fe03fd 100644 --- a/include/osm2rdf/osm/FactHandler.h +++ b/include/osm2rdf/osm/FactHandler.h @@ -26,6 +26,13 @@ #include "osm2rdf/config/Config.h" #include "osm2rdf/ttl/Writer.h" #include "util/geo/Geo.h" +#include "osm2rdf/osm/Area.h" +#include "osm2rdf/osm/Box.h" +#include "osm2rdf/osm/Changeset.h" +#include "osm2rdf/osm/Node.h" +#include "osm2rdf/osm/Relation.h" +#include "osm2rdf/osm/Tag.h" +#include "osm2rdf/osm/TagList.h" namespace osm2rdf::osm { @@ -44,6 +51,7 @@ class FactHandler { osm2rdf::ttl::Writer* writer); // Add data void area(const osm2rdf::osm::Area& area); + void changeset(const osm2rdf::osm::Changeset& changeset); void node(const osm2rdf::osm::Node& node); void relation(const osm2rdf::osm::Relation& relation); void way(const osm2rdf::osm::Way& way); diff --git a/include/osm2rdf/osm/GeometryHandler.h b/include/osm2rdf/osm/GeometryHandler.h index 4761831d..eab74a0e 100644 --- a/include/osm2rdf/osm/GeometryHandler.h +++ b/include/osm2rdf/osm/GeometryHandler.h @@ -28,6 +28,12 @@ #include "gtest/gtest_prod.h" #include "osm2rdf/config/Config.h" #include "osm2rdf/osm/Area.h" +#include "osm2rdf/osm/Box.h" +#include "osm2rdf/osm/Node.h" +#include "osm2rdf/osm/Relation.h" +#include "osm2rdf/osm/Tag.h" +#include "osm2rdf/osm/TagList.h" +#include "osm2rdf/osm/Way.h" #include "osm2rdf/ttl/Writer.h" #include "osm2rdf/util/CacheFile.h" #include "osm2rdf/util/DirectedGraph.h" diff --git a/include/osm2rdf/osm/OsmiumHandler.h b/include/osm2rdf/osm/OsmiumHandler.h index a857623a..4cd0d9e1 100644 --- a/include/osm2rdf/osm/OsmiumHandler.h +++ b/include/osm2rdf/osm/OsmiumHandler.h @@ -40,6 +40,7 @@ class OsmiumHandler : public osmium::handler::Handler { osm2rdf::ttl::Writer* writer); void handle(); void area(const osmium::Area& area); + void changeset(const osmium::Changeset& changeset); void node(const osmium::Node& node); void relation(const osmium::Relation& relation); void way(const osmium::Way& way); @@ -47,6 +48,8 @@ class OsmiumHandler : public osmium::handler::Handler { [[nodiscard]] size_t areasSeen() const; [[nodiscard]] size_t areasDumped() const; [[nodiscard]] size_t areaGeometriesHandled() const; + [[nodiscard]] size_t changesetsSeen() const; + [[nodiscard]] size_t changesetsDumped() const; [[nodiscard]] size_t nodesSeen() const; [[nodiscard]] size_t nodesDumped() const; [[nodiscard]] size_t nodeGeometriesHandled() const; @@ -66,6 +69,8 @@ class OsmiumHandler : public osmium::handler::Handler { size_t _areasSeen = 0; size_t _areasDumped = 0; size_t _areaGeometriesHandled = 0; + size_t _changesetsSeen = 0; + size_t _changesetsDumped = 0; size_t _nodesSeen = 0; size_t _nodesDumped = 0; size_t _nodeGeometriesHandled = 0; diff --git a/include/osm2rdf/ttl/Constants.h b/include/osm2rdf/ttl/Constants.h index 32961b96..aa9e9fad 100644 --- a/include/osm2rdf/ttl/Constants.h +++ b/include/osm2rdf/ttl/Constants.h @@ -25,11 +25,13 @@ namespace osm2rdf::ttl::constants { // Real constants const static inline std::string NAMESPACE__GEOSPARQL = "geo"; +const static inline std::string NAMESPACE__OHM_CHANGESET = "ohmchangeset"; const static inline std::string NAMESPACE__OHM_NODE = "ohmnode"; const static inline std::string NAMESPACE__OHM_RELATION = "ohmrel"; const static inline std::string NAMESPACE__OHM_WAY = "ohmway"; const static inline std::string NAMESPACE__OHM = "ohm"; const static inline std::string NAMESPACE__OPENGIS = "ogc"; +const static inline std::string NAMESPACE__OSM_CHANGESET = "osmchangeset"; const static inline std::string NAMESPACE__OSM_NODE = "osmnode"; const static inline std::string NAMESPACE__OSM_RELATION = "osmrel"; const static inline std::string NAMESPACE__OSM_TAG = "osmkey"; @@ -77,6 +79,7 @@ inline std::string IRI__OSMWAY_NEXT_NODE_DISTANCE; inline std::string IRI__OSMWAY_NODE; inline std::string IRI__OSMWAY_NODE_COUNT; inline std::string IRI__OSMWAY_UNIQUE_NODE_COUNT; +inline std::string IRI__OSM_CHANGESET; inline std::string IRI__OSM_NODE; inline std::string IRI__OSM_RELATION; inline std::string IRI__OSM_TAG; @@ -98,6 +101,8 @@ inline std::string LITERAL__YES; // Arrays holding values depending on the used dataset const static inline std::vector DATASET_ID = {"osm", "ohm"}; +const static inline std::vector CHANGESET_NAMESPACE = { + NAMESPACE__OSM_CHANGESET, NAMESPACE__OHM_CHANGESET}; const static inline std::vector NODE_NAMESPACE = { NAMESPACE__OSM_NODE, NAMESPACE__OHM_NODE}; const static inline std::vector RELATION_NAMESPACE = { diff --git a/include/osm2rdf/ttl/Writer.h b/include/osm2rdf/ttl/Writer.h index bb20ee7f..38342280 100644 --- a/include/osm2rdf/ttl/Writer.h +++ b/include/osm2rdf/ttl/Writer.h @@ -213,7 +213,6 @@ class Writer { uint64_t* _lineCount; // Number of parts. std::size_t _numOuts; - }; } // namespace osm2rdf::ttl diff --git a/src/config/Config.cpp b/src/config/Config.cpp index 37b8de01..fd051587 100644 --- a/src/config/Config.cpp +++ b/src/config/Config.cpp @@ -58,6 +58,9 @@ std::string osm2rdf::config::Config::getInfo(std::string_view prefix) const { if (noAreaFacts) { oss << "\n" << prefix << osm2rdf::config::constants::NO_AREA_FACTS_INFO; } + if (noChangesetFacts) { + oss << "\n" << prefix << osm2rdf::config::constants::NO_CHANGESET_FACTS_INFO; + } if (noNodeFacts) { oss << "\n" << prefix << osm2rdf::config::constants::NO_NODE_FACTS_INFO; } @@ -192,6 +195,10 @@ void osm2rdf::config::Config::fromArgs(int argc, char** argv) { osm2rdf::config::constants::NO_AREA_OPTION_SHORT, osm2rdf::config::constants::NO_AREA_OPTION_LONG, osm2rdf::config::constants::NO_AREA_OPTION_HELP); + auto noChangesetsOp = parser.add( + osm2rdf::config::constants::NO_CHANGESET_OPTION_SHORT, + osm2rdf::config::constants::NO_CHANGESET_OPTION_LONG, + osm2rdf::config::constants::NO_CHANGESET_OPTION_HELP); auto noNodesOp = parser.add( osm2rdf::config::constants::NO_NODE_OPTION_SHORT, osm2rdf::config::constants::NO_NODE_OPTION_LONG, @@ -213,6 +220,10 @@ void osm2rdf::config::Config::fromArgs(int argc, char** argv) { osm2rdf::config::constants::NO_AREA_FACTS_OPTION_SHORT, osm2rdf::config::constants::NO_AREA_FACTS_OPTION_LONG, osm2rdf::config::constants::NO_AREA_FACTS_OPTION_HELP); + auto noChangesetFactsOp = parser.add( + osm2rdf::config::constants::NO_CHANGESET_FACTS_OPTION_SHORT, + osm2rdf::config::constants::NO_CHANGESET_FACTS_OPTION_LONG, + osm2rdf::config::constants::NO_CHANGESET_FACTS_OPTION_HELP); auto noNodeFactsOp = parser.add( osm2rdf::config::constants::NO_NODE_FACTS_OPTION_SHORT, osm2rdf::config::constants::NO_NODE_FACTS_OPTION_LONG, @@ -392,6 +403,7 @@ void osm2rdf::config::Config::fromArgs(int argc, char** argv) { // Select types to dump noAreaFacts = noAreaFactsOp->is_set(); + noChangesetFacts = noChangesetFactsOp->is_set(); noNodeFacts = noNodeFactsOp->is_set(); noRelationFacts = noRelationFactsOp->is_set(); noWayFacts = noWayFactsOp->is_set(); @@ -418,6 +430,7 @@ void osm2rdf::config::Config::fromArgs(int argc, char** argv) { noAreaFacts |= noAreasOp->is_set(); noAreaGeometricRelations |= noAreasOp->is_set(); + noChangesetFacts |= noChangesetsOp->is_set(); noNodeFacts |= noNodesOp->is_set(); noNodeGeometricRelations |= noNodesOp->is_set(); noRelationFacts |= noRelationsOp->is_set(); diff --git a/src/osm/Changeset.cpp b/src/osm/Changeset.cpp new file mode 100644 index 00000000..2414bb8f --- /dev/null +++ b/src/osm/Changeset.cpp @@ -0,0 +1,39 @@ +// Copyright 2024, University of Freiburg +// Authors: Axel Lehmann + +// This file is part of osm2rdf. +// +// osm2rdf is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// osm2rdf is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with osm2rdf. If not, see . + +#include "osm2rdf/osm/Changeset.h" + +#include +#include + +#include "osmium/osm/changeset.hpp" + +// ____________________________________________________________________________ +osm2rdf::osm::Changeset::Changeset() { + _id = std::numeric_limits::max(); +} +// ____________________________________________________________________________ +osm2rdf::osm::Changeset::Changeset(const osmium::Changeset& changeset) + : Changeset() { + _id = changeset.id(); +} + +// ____________________________________________________________________________ +osm2rdf::osm::Changeset::id_t osm2rdf::osm::Changeset::id() const noexcept { + return _id; +} \ No newline at end of file diff --git a/src/osm/CountHandler.cpp b/src/osm/CountHandler.cpp index 59320d04..28d708dd 100644 --- a/src/osm/CountHandler.cpp +++ b/src/osm/CountHandler.cpp @@ -21,10 +21,16 @@ #include // ____________________________________________________________________________ -void osm2rdf::osm::CountHandler::prepare_for_lookup() { - _firstPassDone = true; -} +void osm2rdf::osm::CountHandler::prepare_for_lookup() { _firstPassDone = true; } +// ---------------------------------------------------------------------------- +void osm2rdf::osm::CountHandler::changeset( + const osmium::Changeset& /*unused*/) { + if (_firstPassDone) { + return; + } + _numChangesets++; +} // ____________________________________________________________________________ void osm2rdf::osm::CountHandler::node(const osmium::Node& node){ if (_firstPassDone || node.tags().empty()) { @@ -49,11 +55,14 @@ void osm2rdf::osm::CountHandler::way(const osmium::Way& way) { _numWays++; } -// ____________________________________________________________________________ -size_t osm2rdf::osm::CountHandler::numNodes() const { - return _numNodes; +// ---------------------------------------------------------------------------- +size_t osm2rdf::osm::CountHandler::numChangesets() const { + return _numChangesets; } +// ____________________________________________________________________________ +size_t osm2rdf::osm::CountHandler::numNodes() const { return _numNodes; } + // ____________________________________________________________________________ size_t osm2rdf::osm::CountHandler::numRelations() const { return _numRelations; diff --git a/src/osm/FactHandler.cpp b/src/osm/FactHandler.cpp index 398028c5..46cb1046 100644 --- a/src/osm/FactHandler.cpp +++ b/src/osm/FactHandler.cpp @@ -45,6 +45,7 @@ using osm2rdf::ttl::constants::IRI__OSM2RDF_GEOM__OBB; using osm2rdf::ttl::constants::IRI__OSM2RDF_MEMBER__ID; using osm2rdf::ttl::constants::IRI__OSM2RDF_MEMBER__POS; using osm2rdf::ttl::constants::IRI__OSM2RDF_MEMBER__ROLE; +using osm2rdf::ttl::constants::IRI__OSM_CHANGESET; using osm2rdf::ttl::constants::IRI__OSM_NODE; using osm2rdf::ttl::constants::IRI__OSM_RELATION; using osm2rdf::ttl::constants::IRI__OSM_TAG; @@ -75,6 +76,7 @@ using osm2rdf::ttl::constants::NAMESPACE__OSM_RELATION; using osm2rdf::ttl::constants::NAMESPACE__OSM_TAG; using osm2rdf::ttl::constants::NAMESPACE__OSM_WAY; using osm2rdf::ttl::constants::NAMESPACE__WIKIDATA_ENTITY; +using osm2rdf::ttl::constants::CHANGESET_NAMESPACE; using osm2rdf::ttl::constants::NODE_NAMESPACE; using osm2rdf::ttl::constants::RELATION_NAMESPACE; using osm2rdf::ttl::constants::WAY_NAMESPACE; @@ -122,6 +124,14 @@ void osm2rdf::osm::FactHandler::area(const osm2rdf::osm::Area& area) { _writer->generateLiteralUnsafe(tmp.str(), "^^" + IRI__XSD_DOUBLE)); } +// ____________________________________________________________________________ +template +void osm2rdf::osm::FactHandler::changeset(const osm2rdf::osm::Changeset& changeset) { + const std::string& subj = + _writer->generateIRI(CHANGESET_NAMESPACE[_config.sourceDataset], changeset.id()); + _writer->writeTriple(subj, IRI__RDF_TYPE, IRI__OSM_CHANGESET); +} + // ____________________________________________________________________________ template void osm2rdf::osm::FactHandler::node(const osm2rdf::osm::Node& node) { diff --git a/src/osm/OsmiumHandler.cpp b/src/osm/OsmiumHandler.cpp index d9ba5014..c8455268 100644 --- a/src/osm/OsmiumHandler.cpp +++ b/src/osm/OsmiumHandler.cpp @@ -63,7 +63,7 @@ void osm2rdf::osm::OsmiumHandler::handle() { << "OSM Pass 1 ... (Count objects, Relations for areas" << ", Relation members)" << std::endl; osmium::io::ReaderWithProgressBar reader{true, input_file, - osmium::osm_entity_bits::object}; + osmium::osm_entity_bits::all}; { while (auto buf = reader.read()) { osmium::apply(buf, mp_manager, _relationHandler, countHandler); @@ -74,6 +74,15 @@ void osm2rdf::osm::OsmiumHandler::handle() { _relationHandler.prepare_for_lookup(); std::cerr << osm2rdf::util::currentTimeFormatted() << "... done" << std::endl; + + std::cerr << osm2rdf::util::currentTimeFormatted() + << "changesets found: " << countHandler.numChangesets() << "\n" + << osm2rdf::util::formattedTimeSpacer + << "nodes found: " << countHandler.numNodes() << "\n" + << osm2rdf::util::formattedTimeSpacer + << "relations found: " << countHandler.numRelations() << "\n" + << osm2rdf::util::formattedTimeSpacer + << "ways found: " << countHandler.numWays() << std::endl; } // store data @@ -88,13 +97,16 @@ void osm2rdf::osm::OsmiumHandler::handle() { omp_set_num_threads(_config.numThreads); #endif - osmium::io::Reader reader{input_file, osmium::osm_entity_bits::object, + osmium::io::Reader reader{input_file, osmium::osm_entity_bits::all, pool}; osm2rdf::osm::LocationHandler* locationHandler = osm2rdf::osm::LocationHandler::create(_config); _relationHandler.setLocationHandler(locationHandler); size_t numTasks = 0; + if (!_config.noFacts && !_config.noChangesetFacts) { + numTasks += countHandler.numChangesets(); + } if (!_config.noFacts && !_config.noNodeFacts) { numTasks += countHandler.numNodes(); } @@ -140,17 +152,20 @@ void osm2rdf::osm::OsmiumHandler::handle() { << std::endl; std::cerr << osm2rdf::util::currentTimeFormatted() - << "areas seen:" << _areasSeen << " dumped: " << _areasDumped + << "areas seen: " << _areasSeen << " dumped: " << _areasDumped << " geometry: " << _areaGeometriesHandled << "\n" << osm2rdf::util::formattedTimeSpacer - << "nodes seen:" << _nodesSeen << " dumped: " << _nodesDumped + << "changesets seen: " << _changesetsSeen + << " dumped: " << _changesetsDumped << "\n" + << osm2rdf::util::formattedTimeSpacer + << "nodes seen: " << _nodesSeen << " dumped: " << _nodesDumped << " geometry: " << _nodeGeometriesHandled << "\n" << osm2rdf::util::formattedTimeSpacer << "relations seen:" << _relationsSeen << " dumped: " << _relationsDumped << " geometry: " << _relationGeometriesHandled << "\n" << osm2rdf::util::formattedTimeSpacer - << "ways seen:" << _waysSeen << " dumped: " << _waysDumped + << "ways seen: " << _waysSeen << " dumped: " << _waysDumped << " geometry: " << _wayGeometriesHandled << std::endl; } @@ -194,6 +209,22 @@ void osm2rdf::osm::OsmiumHandler::area(const osmium::Area& area) { } } +// ____________________________________________________________________________ +template +void osm2rdf::osm::OsmiumHandler::changeset( + const osmium::Changeset& changeset) { + _changesetsSeen++; + auto osmChangeset = osm2rdf::osm::Changeset(changeset); +#pragma omp task + { + if (!_config.noFacts && !_config.noChangesetFacts) { + _changesetsDumped++; +#pragma omp task + { _factHandler.changeset(osmChangeset); }; + } + } +} + // ____________________________________________________________________________ template void osm2rdf::osm::OsmiumHandler::node(const osmium::Node& node) { diff --git a/src/ttl/Writer.cpp b/src/ttl/Writer.cpp index 4d422670..a9b27bef 100644 --- a/src/ttl/Writer.cpp +++ b/src/ttl/Writer.cpp @@ -66,6 +66,8 @@ osm2rdf::ttl::Writer::Writer(const osm2rdf::config::Config& config, // osm prefixes {osm2rdf::ttl::constants::NAMESPACE__OSM, "https://www.openstreetmap.org/"}, + {osm2rdf::ttl::constants::NAMESPACE__OSM_CHANGESET, + "https://www.openstreetmap.org/changeset/"}, {osm2rdf::ttl::constants::NAMESPACE__OSM_META, "https://www.openstreetmap.org/meta/"}, {osm2rdf::ttl::constants::NAMESPACE__OSM_TAG, @@ -79,6 +81,8 @@ osm2rdf::ttl::Writer::Writer(const osm2rdf::config::Config& config, // ohm prefixes {osm2rdf::ttl::constants::NAMESPACE__OHM, "https://www.openhistoricalmap.org/"}, + {osm2rdf::ttl::constants::NAMESPACE__OHM_CHANGESET, + "https://www.openhistoricalmap.org/changeset/"}, {osm2rdf::ttl::constants::NAMESPACE__OHM_NODE, "https://www.openhistoricalmap.org/node/"}, {osm2rdf::ttl::constants::NAMESPACE__OHM_RELATION, @@ -147,6 +151,8 @@ osm2rdf::ttl::Writer::Writer(const osm2rdf::config::Config& config, generateIRI(osm2rdf::ttl::constants::NAMESPACE__OSM_WAY, "nodeCount"); osm2rdf::ttl::constants::IRI__OSMWAY_UNIQUE_NODE_COUNT = generateIRI( osm2rdf::ttl::constants::NAMESPACE__OSM_WAY, "uniqueNodeCount"); + osm2rdf::ttl::constants::IRI__OSM_CHANGESET = + generateIRI(osm2rdf::ttl::constants::NAMESPACE__OSM, "changeset"); osm2rdf::ttl::constants::IRI__OSM_NODE = generateIRI(osm2rdf::ttl::constants::NAMESPACE__OSM, "node"); osm2rdf::ttl::constants::IRI__OSM_RELATION = diff --git a/tests/ttl/Writer.cpp b/tests/ttl/Writer.cpp index bfedba57..45b03033 100644 --- a/tests/ttl/Writer.cpp +++ b/tests/ttl/Writer.cpp @@ -702,8 +702,8 @@ TEST(TTL_WriterTTL, writeStatisticJson) { statsBuffer << statsIFStream.rdbuf(); ASSERT_THAT(statsBuffer.str(), ::testing::HasSubstr("\"blankNodes\": 3")); - ASSERT_THAT(statsBuffer.str(), ::testing::HasSubstr("\"header\": 20")); - ASSERT_THAT(statsBuffer.str(), ::testing::HasSubstr("\"lines\": 25")); + ASSERT_THAT(statsBuffer.str(), ::testing::HasSubstr("\"header\": 22")); + ASSERT_THAT(statsBuffer.str(), ::testing::HasSubstr("\"lines\": 27")); ASSERT_THAT(statsBuffer.str(), ::testing::HasSubstr("\"triples\": 5")); // Cleanup @@ -764,8 +764,8 @@ TEST(TTL_WriterQLEVER, writeStatisticJson) { statsBuffer << statsIFStream.rdbuf(); ASSERT_THAT(statsBuffer.str(), ::testing::HasSubstr("\"blankNodes\": 3")); - ASSERT_THAT(statsBuffer.str(), ::testing::HasSubstr("\"header\": 20")); - ASSERT_THAT(statsBuffer.str(), ::testing::HasSubstr("\"lines\": 25")); + ASSERT_THAT(statsBuffer.str(), ::testing::HasSubstr("\"header\": 22")); + ASSERT_THAT(statsBuffer.str(), ::testing::HasSubstr("\"lines\": 27")); ASSERT_THAT(statsBuffer.str(), ::testing::HasSubstr("\"triples\": 5")); // Cleanup