<!DOCTYPE html><html><head><title></title><style type="text/css">#qt #qt-qt p.qt-qt-MsoNormal{margin-top:0cm;margin-right:0cm;margin-left:0cm;margin-bottom:0.0001pt;font-size:12pt;font-family:"Times New Roman", serif;}
#qt #qt-qt a:link{color:blue;text-decoration-line:underline;text-decoration-style:solid;text-decoration-color:currentcolor;text-decoration-thickness:auto;}
#qt #qt-qt a:visited{color:purple;text-decoration-line:underline;text-decoration-style:solid;text-decoration-color:currentcolor;text-decoration-thickness:auto;}
#qt #qt-qt p{margin-right:0cm;margin-left:0cm;font-size:12pt;font-family:"Times New Roman", serif;}
p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div style="font-family:Arial;">PS: Geoconcept might be a better example than AAIGrid, since it's a vector driver.<br></div><div style="font-family:Arial;"><br></div><div>On Thu, Jul 6, 2023, at 16:08, Laurențiu Nicola via gdal-dev wrote:<br></div><blockquote type="cite" id="qt" style=""><div style="font-family:Arial;">Hi,<br></div><div style="font-family:Arial;"><br></div><div style="font-family:Arial;">I think some existing drivers already contain some C files, AIGRID for example. Others have a sdk subdirectory with library code in there. I don't think including your code as C will be a problem.<br></div><div style="font-family:Arial;"><br></div><div style="font-family:Arial;">On the other hand, offering a C API for new drivers might be an interesting idea. Using C++ makes writing drivers in other languages a bit more complicated. But I know this wouldn't be trivial, since GDAL uses inheritance.<br></div><div style="font-family:Arial;"><br></div><div style="font-family:Arial;">Laurentiu<br></div><div style="font-family:Arial;"><br></div><div>On Thu, Jul 6, 2023, at 16:01, Abel Pau wrote:<br></div><blockquote type="cite" id="qt-qt" style=""><div class="qt-qt-WordSection1"><p class="qt-qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;">Hi again.</span></span></span><br></p><p class="qt-qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;">I finally did that and I am happy.</span></span></span><br></p><p class="qt-qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;"> </span></span></span><br></p><p class="qt-qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;">It would be helpful for us to be able to use our C functions to read and write some parts of our format instead of passing
all of them to C++.</span></span></span><br></p><p class="qt-qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;">I’d like doing that but it’s not possible for the moment convert all our code to C++.</span></span></span><br></p><p class="qt-qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;"> </span></span></span><br></p><p class="qt-qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;">My proposal is use a ogrmiramondatasource.cpp, a ogrmiramondriver.cpp and a ogrmiramonlayer.cpp as all of the projects
that are created and add our files from C as necessary.</span></span></span><br></p><p class="qt-qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;">The main goal is adding only the necessary ones.</span></span></span><br></p><p class="qt-qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;"> </span></span></span><br></p><p class="qt-qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;">The question: Is this possible? Can I simply add C files and use that functions from C++ files? Or do GDAL prefer doing
it in another way?</span></span></span><br></p><p class="qt-qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;">Sorry if it is written somewhere else but I couldn’t find it.</span></span></span><br></p><p class="qt-qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;"> </span></span></span><br></p><p class="qt-qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;">Thanks again for your kind help.</span></span></span><br></p></div></blockquote><div style="font-family:Arial;"><br></div><div>_______________________________________________<br></div><div>gdal-dev mailing list<br></div><div><a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br></div><div><a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></div><div><br></div></blockquote><div style="font-family:Arial;"><br></div></body></html>