On Tue, 26 Sep 2017 15:27:59 +0100, Even Rouault
<[email protected]> wrote:
On mardi 26 septembre 2017 15:08:09 CEST Joaquim Luis wrote:
>> P.S. - It seems strange to use python as a CI interface to a C/C++
>>
>> library. Is there a reason the test harness isn't in C/C++?
>
> Mateusz already answered on that. Writing Python tests is
faster/easier
> than C/C++ ones. We/I tend to limit C/C++ written tests to part of the
> API not available >through the Python API.
That's where Julia might help. From Julia we can call any of the C
functions directly from the gdal lib without needing to compile
anything.
There is this Julia wrapper https://github.com/visr/GDAL.jl but I
confess
that never used it and it probably does not provide wrappers to all
functions. Bur new ones are not difficult to write.
Actually there's a similar mechanism in Python with the ctypes module:
https://docs.python.org/3/library/ctypes.html
I had used it a bit. For example in
https://trac.osgeo.org/gdal/browser/trunk/autotest/gcore/testnonboundtoswig.py#L166
Downside of this approach is that if you could get the function
prototype wrong
and a runtime crash, as there's no checking against the .h files.
Even
Right, but in Julia a function wrapper may be as simple as
function getdriverbyname(arg1)
checknull(ccall((:GDALGetDriverByName,libgdal),Ptr{GDALDriverH},(Cstring,),arg1))
end_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev