<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Gane,<br>
<br>
it requires only minor modifications. In my Code I have a FLAG
(HAVE_GDAL2) which makes it compile against both versions. <br>
The changes are along the lines of:<br>
<br>
#ifdef HAVE_GDAL2<br>
GDALDataset *ogrDataset;<br>
#else<br>
OGRDataSource* ogrDataset;<br>
#endif<br>
<br>
#ifdef HAVE_GDAL2<br>
GDALAllRegister();<br>
unsigned int nOpenFlags=GDAL_OF_VECTOR;<br>
GDALDriver
*poDriver=GetGDALDriverManager()->GetDriverByName(driver);<br>
ogrDataset=(GDALDataset*) GDALOpenEx(filename,nOpenFlags,
NULL, NULL, NULL);<br>
#else<br>
OGRRegisterAll();<br>
ogrDataset=OGRSFDriverRegistrar::Open(filename, FALSE );<br>
#endif<br>
<br>
<br>
#ifdef HAVE_GDAL2<br>
GDALClose(ogrDataset);<br>
#else<br>
OGRDataSource::DestroyDataSource(ogrDataset); <br>
#endif<br>
<br>
<br>
Cheers Julian<br>
<br>
Am 17.07.2018 um 14:34 schrieb Gane R:<br>
</div>
<blockquote type="cite"
cite="mid:CALMrLdBno8S+-=PtviwwGZd=r4Tx1xBsbJHV3yb9=ucaKDLuRw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<div dir="ltr">
<div>Hi all,</div>
<div><br>
</div>
<div>Is gdal-1.11.3, opening vector data set, reading OGR
features code compatible with gdal-2.3.1 code or any major
changes in accessing OGR features ? <br>
</div>
<div><br>
</div>
<div>Thanks</div>
<div>Gane<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></pre>
</blockquote>
<p><br>
</p>
</body>
</html>