Geospatial library for the iPhone

人走茶凉 提交于 2019-11-30 17:07:08

For distance between points, see CLLocation's getDistanceFrom: method.

I'm not sure what you mean by geospatial boundaries, but if you mean you have a rectangle defining a location, you can convert it to a CGRect, offset the latitude and longitude of all of your points by 90 and 180 respectively to make sure you don't have negative numbers, convert your CLLocation objects to CGPoints, then use CGRectContainsPoint to figure out if your location is within that rectangle.

All of the described functions are part of the standard iPhone SDK.

Ok, it took me some time but now I think that I'm properly able to build the static libs or GEOS for iPhone (x86 and ARM for both the simulator and the real device) : libgeos.a and libgeos_c.a : the implementation and its api.

You can get the binaires there (for GEOS version 3.1.1, this is not the very last one) : http://bit.ly/aTKsI6

(there are some other binaries there, the rest is for spatialite)

The job has been mostly achieved by understanding the way cross compilation is done via .sh scripts. This blog is a must see for that : http://robertcarlsen.net/2009/07/15/cross-compiling-for-iphone-dev-884

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!