[gdal-dev] How to build a Raster Attribute Table for a GeoTiff grid file using GDAL API in c only, not c++?

sam sung samsung460 at gmail.com
Sun Jan 19 16:25:35 PST 2014


Hello, folks,

Sorry, the attactment was scrubed in my previous email since it  cannot be
in a .rar file.   In this email, I changed the file extension to .rar_1.
After grab it, please change back the file extension to .rar to open in rar.



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.

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”,

 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.

 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”.

 My question: Is GDAL API able to be used to build a Raster Attribute Table
for GeoTiff raster?

Any help will be appriciated.





 Regards,

Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140120/4852dce7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdal_built_RAT.rar_1
Type: application/octet-stream
Size: 5047 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140120/4852dce7/attachment.obj>


More information about the gdal-dev mailing list