本文整理汇总了C++中osmium::Node::uid方法的典型用法代码示例。如果您正苦于以下问题:C++ Node::uid方法的具体用法?C++ Node::uid怎么用?C++ Node::uid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osmium::Node
的用法示例。
在下文中一共展示了Node::uid方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: check_node_2
void check_node_2(osmium::Node& node) {
REQUIRE(2 == node.id());
REQUIRE(3 == node.version());
REQUIRE(true == node.visible());
REQUIRE(333 == node.changeset());
REQUIRE(21 == node.uid());
REQUIRE(123 == node.timestamp());
REQUIRE(osmium::Location(3.5, 4.7) == node.location());
REQUIRE(std::string("testuser") == node.user());
for (osmium::memory::Item& item : node) {
REQUIRE(osmium::item_type::tag_list == item.type());
}
REQUIRE(!node.tags().empty());
REQUIRE(2 == std::distance(node.tags().begin(), node.tags().end()));
int n = 0;
for (const osmium::Tag& tag : node.tags()) {
switch (n) {
case 0:
REQUIRE(std::string("amenity") == tag.key());
REQUIRE(std::string("bank") == tag.value());
break;
case 1:
REQUIRE(std::string("name") == tag.key());
REQUIRE(std::string("OSM Savings") == tag.value());
break;
}
++n;
}
REQUIRE(2 == n);
}
示例2: check_node_2
void check_node_2(osmium::Node& node) {
BOOST_CHECK_EQUAL(2, node.id());
BOOST_CHECK_EQUAL(3, node.version());
BOOST_CHECK_EQUAL(true, node.visible());
BOOST_CHECK_EQUAL(333, node.changeset());
BOOST_CHECK_EQUAL(21, node.uid());
BOOST_CHECK_EQUAL(123, node.timestamp());
BOOST_CHECK_EQUAL(osmium::Location(3.5, 4.7), node.location());
BOOST_CHECK_EQUAL("testuser", node.user());
for (osmium::memory::Item& item : node) {
BOOST_CHECK_EQUAL(osmium::item_type::tag_list, item.type());
}
BOOST_CHECK(!node.tags().empty());
BOOST_CHECK_EQUAL(2, std::distance(node.tags().begin(), node.tags().end()));
int n = 0;
for (osmium::Tag& tag : node.tags()) {
switch (n) {
case 0:
BOOST_CHECK_EQUAL("amenity", tag.key());
BOOST_CHECK_EQUAL("bank", tag.value());
break;
case 1:
BOOST_CHECK_EQUAL("name", tag.key());
BOOST_CHECK_EQUAL("OSM Savings", tag.value());
break;
}
++n;
}
BOOST_CHECK_EQUAL(2, n);
}
示例3: node
void node(const osmium::Node& node) {
++nodes;
if (!matches_user_filter(node)) return;
++unodes;
if (node.visible()==false) {
m_nodefile <<
node.id() << "\t" <<
node.version() << "\t" <<
node.changeset() << "\t" <<
node.timestamp().to_iso() << "\t" <<
node.uid() << std::endl;
}
}
示例4: check_node_1
void check_node_1(osmium::Node& node) {
REQUIRE(1 == node.id());
REQUIRE(3 == node.version());
REQUIRE(true == node.visible());
REQUIRE(333 == node.changeset());
REQUIRE(21 == node.uid());
REQUIRE(123 == node.timestamp());
REQUIRE(osmium::Location(3.5, 4.7) == node.location());
REQUIRE(std::string("testuser") == node.user());
for (osmium::memory::Item& item : node) {
REQUIRE(osmium::item_type::tag_list == item.type());
}
REQUIRE(node.tags().begin() == node.tags().end());
REQUIRE(node.tags().empty());
REQUIRE(0 == std::distance(node.tags().begin(), node.tags().end()));
}
示例5: check_node_1
void check_node_1(osmium::Node& node) {
BOOST_CHECK_EQUAL(1, node.id());
BOOST_CHECK_EQUAL(3, node.version());
BOOST_CHECK_EQUAL(true, node.visible());
BOOST_CHECK_EQUAL(333, node.changeset());
BOOST_CHECK_EQUAL(21, node.uid());
BOOST_CHECK_EQUAL(123, node.timestamp());
BOOST_CHECK_EQUAL(osmium::Location(3.5, 4.7), node.location());
BOOST_CHECK_EQUAL("testuser", node.user());
for (osmium::memory::Item& item : node) {
BOOST_CHECK_EQUAL(osmium::item_type::tag_list, item.type());
}
BOOST_CHECK_EQUAL(node.tags().begin(), node.tags().end());
BOOST_CHECK(node.tags().empty());
BOOST_CHECK_EQUAL(0, std::distance(node.tags().begin(), node.tags().end()));
}