我有一些以地球为中心的坐标点,以纬度和经度(WGS-84)给出.
如何将它们转换为笛卡尔坐标(x,y,z),原点位于地球的中心?
我怎么能转换CLLocation或CLLocationCoordinate2D到CGPoint.我见过
CGPoint point = [mapView convertCoordinate:myCoordinates toPointToView:self.view];
Run Code Online (Sandbox Code Playgroud)
但我不需要mapView在我的情况下使用.我试过谷歌搜索,但没有遇到任何有用的东西.
编辑:我需要将地理坐标转换为iPad的屏幕坐标,如将十进制纬度/经度坐标转换为iPad屏幕坐标.我试图根据转换的坐标值绘制线/路径.
Is there a direct way to do it, or do I need to write an algorithm to do the same.