[gdal-dev] A Swift wrapper for GDAL

Roberto Arista arista.rob at gmail.com
Wed May 19 07:08:10 PDT 2021


Dear gdal-dev list,
I would like to use the GDAL library for a macOS project using the Swift language. Wrapping a C++ library in Swift is not straightforward at all, and I could not find a satisfactory solution so far.

There are a few projects on GitHub:
> https://github.com/optionu/Humboldt
> https://github.com/ranveerm/SwiftGDALProject
but they are either incomplete or outdated

So, I'll probably have to write the wrapper myself. Before even planning the work, I have a few questions for the list. My focus will be on the OGR module of the library.
- From what I've read so far, wrapping a C library in Swift is way easier than working with C++. I've seen from the docs that GDAL has both C and C++ APIs. Besides the difference between the two languages, do the APIs offer different functionalities? 
- Is anyone willing to join forces to work on a GDAL wrapper for Swift? Or, is any expert developer willing to help me writing the wrapper? Of course, I am going to release the code with an open-source license.

Best
–––
Roberto Arista
ಠ_ಠ
–––



More information about the gdal-dev mailing list