Skip to content

jl2/cl-gdal

Repository files navigation

cl-gdal

Common Lisp bindings to the GDAL C API.

At some point I intend to add these bindings to QuickLisp, but until then it must be installed manually.

Getting Started

This binding uses cl-autowrap, which makes it easy to build the bindings from the source code.

Note that I've made changes to cl-autowrap that aren't yet in the upstream version. Specifically, I've added a :language parameter to autowrap:c-include to force parsing as a specific language. This ensures clang only looks at the C sources instead of C++.

Install GDAL

Install GDAL using the instructions on their website.

Get GDAL Bindings

In your local Lisp project directory, clone the cl-gdal library:

git clone git@github.com:jl2/cl-gdal.git

Load GDAL bindings in the REPL

In Slime:

(ql:quickload :gdal.examples)

The quickload will take several seconds the first time, as autwrap needs to run c2ffi, parse the .spec files, and generate code. Subsequent loads should be much faster.

Next, run one of the getting started examples:

;; TODO: Include a GeoTiff in the examples directory to show.
(gdal.examples:getting-started-2 :file-name "some-file.tif")

License

ISC

Copyright (c) 2019 Jeremiah LaRocco jeremiah_larocco@fastmail.com

About

Common Lisp bindings to GDAL.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages