我正在研究必须进行区域监控的地理围栏。我是地理围栏主题的新手。我有bounds(最小-最大坐标)和geometry数据(所有位置坐标)。从下面bounds,我正在创建CLCircularRegion。
"bounds":{"minlat":50.7238333,"minlon":-1.8716499,"maxlat":50.7248599,"maxlon":-1.8683962}
要初始化CLCircularRegion,我们需要center和radius。我centerpoint使用以下公式计算:
center = CLLocationCoordinate2D(latitude: CLLocationDegrees((minLat + maxLat) / 2), longitude: CLLocationDegrees((minLng + maxLng) / 2))
但我无法理解如何计算半径。任何想法如何做到这一点?