[gdal-dev] GDAL Bindings for Go

Luke Roth roth.luke at gmail.com
Wed Oct 3 19:44:20 PDT 2012


A good point.  I considered using SWIG to generate the bindings, it
looks like the support is pretty good, but I decided to "roll my own"
for now for a couple of reasons. I thought it would be a good way to
learn by getting my hands dirty with some of the lower-level nuts and
bolts of Go, and it would give me a chance to look closely at the API
and see where there were opportunities to make it more "go-like".
Going forward, I might try seeing how SWIG handles things, it might
make long-term maintenance easier (although the GDAL API is pretty
mature at this point).
I'll take a look at the GDAL Trac pages, although I might wait until
I've had a chance to fill in some of the missing areas and add to the
(currently pretty minimal) documentation.
Luke

On Wed, Oct 3, 2012 at 6:02 PM, Even Rouault
<even.rouault at mines-paris.org> wrote:
> Le mercredi 03 octobre 2012 20:46:10, Luke Roth a écrit :
>> For any who are interested, I've published a (incomplete, but growing)
>> set of GDAL bindings for the Go language at
>> https://github.com/lukeroth/gdal.go .
>> The bindings cover most of the GDAL C API, the OGR C API is next.
>> More details are available at the Github page.  Let me know if you
>> find them useful!
>
> The majority of GDAL bindings (Perl, Python, Java, C# at least) are generated
> by using SWIG bindings ( see swig/include in GDAL source tree ). Looking
> quickly at http://www.swig.org/Doc2.0/Go.html , it seems you could possibly
> have used it instead of writing from scratch. But I've never used Go, nor the
> SWIG Go generator, so just take it as a hint, not an enlightened advice based
> on experience.
>
> Anyway, you could create a page to advertise your Go bindings in GDAL Trac (
> http://trac.osgeo.org/gdal/wiki/GdalOgrInGo for example ) and make a link to
> it from the "GDAL/OGR In Other Languages" section of the main Trac page (
> http://trac.osgeo.org/gdal/wiki )
>
>> Luke
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list