Uses PROJ coordinate transformation software library; Open Source Geospatial Foundation; Version 7.1.0 - https://github.com/OSGeo/PROJ
Add this repository to your projects Cartfile
github "atetlaw/projios"
and run carthage update
- Include built proj.framework into xcode project and add header
import proj
Requires libsqlite3
(linked)
Proj requires proj.db
at runtime. proj.db is the generated db file.
What I did is:
- take the file add it to my main app project
- then define the environment variable
PROJ_LIB
with the path to the dir containing the db. Added this to AppDelegate:
setenv("PROJ_LIB", Bundle.main.bundlePath, 1)
If you want to generate the db file yourself:
$ brew install autoconf automake libtool libtiff
(if you don't have them installed like me)cd
to the mainproj
directory (where the proj submodule code resides)- run
$ ./autogen.sh
- run
$ ./configure
- Then
cd
to thedata
dir, where you can runmake
to generate theproj.db
file.
Full proj documentation can be found at https://proj.org