本文整理汇总了C++中ConstOsmMapPtr::getRelation方法的典型用法代码示例。如果您正苦于以下问题:C++ ConstOsmMapPtr::getRelation方法的具体用法?C++ ConstOsmMapPtr::getRelation怎么用?C++ ConstOsmMapPtr::getRelation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConstOsmMapPtr
的用法示例。
在下文中一共展示了ConstOsmMapPtr::getRelation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: write
void OsmPgCsvWriter::write(ConstOsmMapPtr map)
{
QList<long> ids;
// Start with the nodes
const NodeMap& nodes = map->getNodes();
for (NodeMap::const_iterator it = nodes.begin(); it != nodes.end(); ++it)
ids.append(it->first);
// Sort the values to give consistent results.
qSort(ids.begin(), ids.end(), qLess<long>());
for (int i = 0; i < ids.size(); i++)
writePartial(map->getNode(ids[i]));
// Next are the ways
ids.clear();
const WayMap& ways = map->getWays();
for (WayMap::const_iterator it = ways.begin(); it != ways.end(); ++it)
ids.append(it->first);
// Sort the values to give consistent results.
qSort(ids.begin(), ids.end(), qLess<long>());
for (int i = 0; i < ids.size(); i++)
writePartial(map->getWay(ids[i]));
// Finally the relations
ids.clear();
const RelationMap& relations = map->getRelations();
for (RelationMap::const_iterator it = relations.begin(); it != relations.end(); ++it)
ids.append(it->first);
// Sort the values to give consistent results.
qSort(ids.begin(), ids.end(), qLess<long>());
for (int i = 0; i < ids.size(); i++)
writePartial(map->getRelation(ids[i]));
}