<div dir="auto">Hi,<div dir="auto">Thanks for your reply! </div><div dir="auto">Say I am implementing some raster processing algorithm in c++ (thus using gdal c api to load the input and to create an output ds) and want to write python code that takes the result and post process it (say use gdal_calc.py to combine some results of that function).</div><div dir="auto"><br></div><div dir="auto">I was able to save the result raster to a file in c++ (through a python call) and load the file in python (via gdal python api), but I want to avoid using the intermediate file and just use the same instance of a ds. </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 25 Jun 2020, 22:21 Andrew Bell, <<a href="mailto:andrew.bell.ia@gmail.com">andrew.bell.ia@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 25, 2020 at 2:40 PM Idan Miara <<a href="mailto:idan@miara.com" target="_blank" rel="noreferrer">idan@miara.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="ltr">Hi all,<div><br></div><div>I am writing a C++ library with a C API that links to GDAL dynamically with LoadLibrary.</div><div></div><div>I would like to access the C API via Python and I have a few questions.</div><div><br></div><div>Currently the library compiled with MSVC and I was able to access some functions from python via SWIG but I didn't try to pass GDAL types back and forth.<br></div><div><br></div><div><div>1. How do I make my library open the same instance of GDAL dll that is used by the GDAL Python bindings?</div></div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="ltr"><div><div>2. Are the SWIG bindings written manually for every new C function or is there an semi/automated way to create it?</div><div></div></div><div>3. Is there an example for a library that creates gdal datasets in C/C++ and sends them to Python (or the other way around) to continue the process? any best practices?</div></div></div></blockquote><div><br></div><div>Maybe an example of what you're trying to do would be helpful.</div><div><br></div><div>If you're writing your code that's calling GDAL from C++, why are you concerned about Python bindings?</div><div><br></div><div>-- <br></div></div><div dir="ltr">Andrew Bell<br><a href="mailto:andrew.bell.ia@gmail.com" target="_blank" rel="noreferrer">andrew.bell.ia@gmail.com</a></div></div>
</blockquote></div>