(纬度,经度)从半径创建边界框

时间:2022-08-08 16:03:52

The f I have one pair of latitude and longitude and a radius

f我有一对纬度和经度以及一个半径

How can I create a box around this pair based on the radius?

如何根据半径在该对周围创建一个框?

1 个解决方案

#1


-1  

So, supposing that (latitude,longitude) is the center of your circle, the bounding box (square) that contains the circle would have its corners at the following positions:

因此,假设(纬度,经度)是圆的中心,包含圆的边界框(正方形)的角位于以下位置:

(latitude-radius,longitude-radius)

(latitude-radius,longitude+radius)

(latitude+radius,longitude+radius)

(latitude+radius,longitude-radius)

#1


-1  

So, supposing that (latitude,longitude) is the center of your circle, the bounding box (square) that contains the circle would have its corners at the following positions:

因此,假设(纬度,经度)是圆的中心,包含圆的边界框(正方形)的角位于以下位置:

(latitude-radius,longitude-radius)

(latitude-radius,longitude+radius)

(latitude+radius,longitude+radius)

(latitude+radius,longitude-radius)