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


C++ GeometryFactory::createPoint方法代码示例

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


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

示例1: make_point

 point_type make_point(const osmium::geom::Coordinates& xy) const {
     try {
         return point_type{m_geos_factory->createPoint(geos::geom::Coordinate{xy.x, xy.y})};
     } catch (const geos::util::GEOSException& e) {
         THROW(osmium::geos_geometry_error(e.what()));
     }
 }
开发者ID:KnockSoftware,项目名称:osrm-backend,代码行数:7,代码来源:geos.hpp

示例2: make_point

 point_type make_point(const osmium::geom::Coordinates& xy) const {
     try {
         return point_type(m_geos_factory.createPoint(geos::geom::Coordinate(xy.x, xy.y)));
     } catch (geos::util::GEOSException&) {
         THROW(osmium::geos_geometry_error());
     }
 }
开发者ID:Gozhack,项目名称:osrm-backend,代码行数:7,代码来源:geos.hpp

示例3: create_discs

 void create_discs(geos::geom::GeometryFactory& gf, int num, double radius, 
     std::vector<geos::geom::Polygon*>* g)
 {
     for (int i = 0; i < num; ++i) {
         for (int j = 0; j < num; ++j) {
             std::auto_ptr<geos::geom::Point> pt(
                 gf.createPoint(geos::geom::Coordinate(i, j)));
             g->push_back(dynamic_cast<geos::geom::Polygon*>(pt->buffer(radius)));
         }
     }
 }
开发者ID:ryandavid,项目名称:rotobox,代码行数:11,代码来源:CascadedPolygonUnionTest.cpp

示例4: pg

		bool
		pointsWithinDistance(vector<Coordinate>& coords, double dist)
		{
			// we expect some numerical instability here
			// OffsetPointGenerator could produce points
			// at *slightly* farther locations then
			// requested
			//
			dist *= 1.0000001;

			for (size_t i=0, n=coords.size(); i<n; ++i)
			{
				const Coordinate& c = coords[i];
				auto_ptr<Geometry> pg(gf.createPoint(c));
				double rdist =  g->distance(pg.get());
				if ( rdist > dist )
				{
					return false;
				}
			}
			return true;
		}
开发者ID:h4ck3rm1k3,项目名称:geos,代码行数:22,代码来源:OffsetPointGeneratorTest.cpp


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