I want to add to Python bindings some functions which currently are
in C API. Are there any instructions about how to proceed? As I
understand, I need to add function declaration to the
swing/include/Operations.i and also add missed
type definitions somewhere. Is this correct approach?
On mercredi 1 mars 2017 19:56:30 CET Alexander Bruy wrote:
> in C API. Are there any instructions about how to proceed? As I
> understand, I need to add function declaration to the
Yes, in Operations.i, for things that are typically in gdal_alg.h . For other stuff, other .i might be more appropriate
> and also add missed
> type definitions somewhere.
Yes, in swig/include/python/typemaps.i
If your method requires new typemaps, and they are not available in other languages and that you don't know how to add for those languages, you can protect your addition in the .i with a #ifdef SWIGPYTHON #endif