当前位置: 首页>>代码示例>>C++>>正文


C++ Way::ends_have_same_location方法代码示例

本文整理汇总了C++中osmium::Way::ends_have_same_location方法的典型用法代码示例。如果您正苦于以下问题:C++ Way::ends_have_same_location方法的具体用法?C++ Way::ends_have_same_location怎么用?C++ Way::ends_have_same_location使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在osmium::Way的用法示例。


在下文中一共展示了Way::ends_have_same_location方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: way_not_in_any_relation

 /**
  * This is called when a way is not in any multipolygon
  * relation.
  *
  * Overwritten from the base class.
  */
 void way_not_in_any_relation(const osmium::Way& way) {
     if (way.nodes().size() > 3 && way.ends_have_same_location()) {
         // way is closed and has enough nodes, build simple multipolygon
         try {
             TAssembler assembler(m_assembler_config);
             assembler(way, m_output_buffer);
             possibly_flush_output_buffer();
         } catch (osmium::invalid_location&) {
             // XXX ignore
         }
     }
 }
开发者ID:Androidized,项目名称:osrm-backend,代码行数:18,代码来源:multipolygon_collector.hpp

示例2: way_not_in_any_relation

 /**
  * This is called when a way is not in any multipolygon
  * relation.
  */
 void way_not_in_any_relation(const osmium::Way& way) {
     // you need at least 4 nodes to make up a polygon
     if (way.nodes().size() <= 3) {
         return;
     }
     try {
         if (!way.nodes().front().location() || !way.nodes().back().location()) {
             throw osmium::invalid_location{"invalid location"};
         }
         if (way.ends_have_same_location()) {
             // way is closed and has enough nodes, build simple multipolygon
             TAssembler assembler{m_assembler_config};
             assembler(way, this->buffer());
             m_stats += assembler.stats();
         }
     } catch (const osmium::invalid_location&) {
         // XXX ignore
     }
 }
开发者ID:tomhughes,项目名称:libosmium,代码行数:23,代码来源:multipolygon_manager_legacy.hpp

示例3: way_not_in_any_relation

 /**
  * This is called when a way is not in any multipolygon
  * relation.
  *
  * Overwritten from the base class.
  */
 void way_not_in_any_relation(const osmium::Way& way) {
     // you need at least 4 nodes to make up a polygon
     if (way.nodes().size() <= 3) {
         return;
     }
     try {
         if (!way.nodes().front().location() || !way.nodes().back().location()) {
             throw osmium::invalid_location("invalid location");
         }
         if (way.ends_have_same_location()) {
             // way is closed and has enough nodes, build simple multipolygon
             TAssembler assembler(m_assembler_config);
             assembler(way, m_output_buffer);
             possibly_flush_output_buffer();
         }
     } catch (osmium::invalid_location&) {
         // XXX ignore
     }
 }
开发者ID:dforsi,项目名称:libosmium,代码行数:25,代码来源:multipolygon_collector.hpp


注:本文中的osmium::Way::ends_have_same_location方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。