【问题标题】:Minimum bounding rectangle of a circle on a sphere球体上圆的最小外接矩形
【发布时间】:2011-03-08 03:02:41
【问题描述】:

哪些 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 中,但我找不到。我目前正在变形为 R 的最接近的(来自 SO)是:

http://janmatuschek.de/LatitudeLongitudeBoundingCoordinates

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

【问题讨论】:

标签: r geometry great-circle


【解决方案1】:

给我的:

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

【讨论】:

    【解决方案2】:

    使用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]))
    

    【讨论】:

    • 这是否适用于球体表面的圆? (越过两极或 180 度子午线?)您将如何使用纬度和经度?
    • @Dave Jarvis:哎呀......我没有正确阅读您的问题(抱歉,是一大早)。不,这需要一些调整。
    猜你喜欢
    • 1970-01-01
    • 2020-12-08
    • 1970-01-01
    • 2017-09-12
    • 1970-01-01
    • 1970-01-01
    • 2010-11-07
    • 2016-03-07
    • 2018-11-07
    相关资源
    最近更新 更多