<div dir="ltr"><div lang="EN-AU" vlink="purple" link="blue"><div><div><div><div><div><p class="MsoNormal"><span style="font-family:"Calibri","sans-serif""><font face="georgia,serif"><font><font><font color="#000000"><font style="background-color:rgb(255,255,255)">Hello, folks,<u></u><u></u></font></font></font></font></font></span></p>
</div><div><p class="MsoNormal"><span style="font-family:"Calibri","sans-serif""><font face="georgia,serif"><font><font><font color="#000000"><font style="background-color:rgb(255,255,255)"> <u></u><u></u></font></font></font></font></font></span></p>
</div><div><p class="MsoNormal"><span style="font-family:"Calibri","sans-serif""><font face="georgia,serif"><font><font><font color="#000000"><font style="background-color:rgb(255,255,255)">I tried to build a Raster Attribute Table (denoted as RAT below) for a GeoTiff raster file(attached as “test.tif”) in C within Visual Studio 2008. This C file was compiled through and there was no errors reported.<u></u><u></u></font></font></font></font></font></span></p>
</div><div><p class="MsoNormal"><span style="font-family:"Calibri","sans-serif""><font face="georgia,serif"><font><font><font color="#000000"><font style="background-color:rgb(255,255,255)"> <u></u><u></u></font></font></font></font></font></span></p>
</div><div><p class="MsoNormal"><span style="font-family:"Calibri","sans-serif""><font style="background-color:rgb(255,255,255)" color="#000000" face="georgia,serif">I used GDALSetDefaultRAT function, it was successful. But when I used GDALRATCreateColumn function to create RAT fields, it was always report errors. I tested how well the c++ file “rfc40_tests_hfa.cpp” works(Downloaded from the GDAL forum). I found this code only works on HFA driver, i.e., .img grid file, not .tif grid because the same errors occur when I changed the driver from “HFA” to “GTiff”, </font></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif""><u></u><font face="georgia,serif"><font><font><font color="#000000"><font style="background-color:rgb(255,255,255)"> <u></u></font></font></font></font></font></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif""><font face="georgia,serif"><font><font><font color="#000000"><font style="background-color:rgb(255,255,255)">I downloaded and used gdal-110-1500-core.msi, which is gdal 1.10 version API library for Windows. I worked with C++ under Visual Studio 2008 professional.<u></u><u></u></font></font></font></font></font></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif""><u></u><font face="georgia,serif"><font><font><font color="#000000"><font style="background-color:rgb(255,255,255)"> <u></u></font></font></font></font></font></span></p>
</div><div><p class="MsoNormal"><span style="font-family:"Calibri","sans-serif""><font color="#000000"><font style="background-color:rgb(255,255,255)"><font face="georgia,serif">I have attached the GeoTiff file as "test.tif" and my C source code file "gtiff_rat.c". I also attached the c++ file “rfc40_tests_hfa.cpp”.<u></u><u></u></font></font></font></span></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri","sans-serif""><u></u><font color="#000000"><font style="background-color:rgb(255,255,255)"><font face="georgia,serif"> <u></u></font></font></font></span></p>
<font face="georgia,serif">My question: Is GDAL API able to be used to build a Raster Attribute Table for GeoTiff raster?</font></div><div><font face="georgia,serif"></font> </div><div><p class="MsoNormal"><span style="font-family:"Calibri","sans-serif""><font><font><font color="#000000"><font style="background-color:rgb(255,255,255)"><font face="georgia,serif">Any help will be appriciated.<u></u><u></u></font></font></font></font></font></span></p>
</div><div><p class="MsoNormal"><span style="font-family:"Calibri","sans-serif""><font><font><font color="#000000"><font style="background-color:rgb(255,255,255)"><font face="georgia,serif"> <u></u><u></u></font></font></font></font></font></span></p>
</div><font face="georgia,serif">Regards,<br><br>Sam</font></div></div><p class="MsoNormal"><span style="color:rgb(13,13,13);font-family:"Arial","sans-serif""><u></u><font face="georgia,serif"><font><font><font color="#000000"><font style="background-color:rgb(255,255,255)"> <u></u></font></font></font></font></font></span></p>
</div></div></div><br></div>