简体   繁体   English

提升几何圆段交点

[英]boost geometry circle segment intersection

I have two GPS coordinates (p, q) that are endpoints of a segment. 我有两个GPS坐标(p, q) ,它们是一个线段的端点。 I have a third point c which is the center of a circle with radius r . 我有第三个点c ,它是半径为r的圆的中心。 My objective is to find the set of intersection points X between these two geometries. 我的目标是找到这两个几何之间的交点X集。

There can be at least 0 and at most 2 intersections. 至少可以有0个交叉点,最多2个交叉点。 I didn't find any ellipse or circle like geometry in boost-geometry. 我没有在boost-geometry中找到任何椭圆或圆形等几何形状。 Is there any intersection strategy that yields intersection point x which is r distance away from c ? 是否有任何相交策略产生的交点xc距离为r

Boost Geometry doesn't have the concept of a circle. Boost Geometry没有圆的概念。

The common way to approximate a circle is by generating a regular n-gon where n is high. 逼近圆的常见方法是生成一个规则的n边,其中n为高。

You could use a k-nearest search for the endpoints of the line segment instead: boost::geometry: nearest neighbors using a circle - this would answer a subset of the questions answerable with your question description. 您可以使用k最近搜索来搜索线段的端点: boost :: geometry:使用圆的最近邻居 -这将回答问题描述中可回答的部分问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM