球体上圆的最小外接矩形

发布于 2024-09-06 19:25:39 字数 850 浏览 2 评论 0原文

哪些 R 包可用于计算大圆的最小边界框?

例如:

box <- polycirc( c( longitude, latitude ), distance=35 )

这将返回距给定坐标(在地球上)的中心点半径为 35 公里的圆的边界框。其中:

box.longitude_min = The longitude of the circle's western-most point.
box.longitude_max = The longitude of the circle's eastern-most point.
box.latitude_min = The latitude of the circle's southern-most point.
box.latitude_max = The latitude of the circle's northern-most point.

类似的东西应该已经存在于 R 中,但我找不到它。我发现的最接近的(来自SO),我目前正在将其转换为R,是:

http://janmatuschek.de /LatitudeLongitudeBoundingCooperatives

另外,圆的最小外接矩形用什么词(如果有的话)? (与限制相反。)

What R packages are available to calculate the minimum bounding box for a great circle?

For example:

box <- polycirc( c( longitude, latitude ), distance=35 )

This would return the bounding box for the circle with a radius of 35 kilometres from the central point at the given coordinates (on Earth). Where:

box.longitude_min = The longitude of the circle's western-most point.
box.longitude_max = The longitude of the circle's eastern-most point.
box.latitude_min = The latitude of the circle's southern-most point.
box.latitude_max = The latitude of the circle's northern-most point.

Something like this should already exist in R, but I cannot find it. The closest I've found (from SO), which I am currently transmogrifying to R, is:

http://janmatuschek.de/LatitudeLongitudeBoundingCoordinates

Also, what is the word (if any) for minimum bounding rectangle of a circle? (The opposite of circumscribed.)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

水中月 2024-09-13 19:25:39

给我:

  library( geosphere )
  p <- c( longitude, latitude )
  box <- apply( destPoint( p, c(0, 90, 180, 270), distance ), 2, range )
  print( box )

Given to me:

  library( geosphere )
  p <- c( longitude, latitude )
  box <- apply( destPoint( p, c(0, 90, 180, 270), distance ), 2, range )
  print( box )
ゃ人海孤独症 2024-09-13 19:25:39

使用 polycirc 函数生成圆的点,然后使用 minmax 找到边界框:)

require(pgirmess)
circle <- polycirc(20, c(10, 20))
plot(circle, type = "l")
rect(min(circle[,1]), min(circle[,2]), max(circle[,1]), max(circle[,2]))

Use the polycirc function to generate the points of the circle and then min and max to found the bounding box :)

require(pgirmess)
circle <- polycirc(20, c(10, 20))
plot(circle, type = "l")
rect(min(circle[,1]), min(circle[,2]), max(circle[,1]), max(circle[,2]))
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文