[gdal-dev] AIG field types erroneously classified as GFT_String

Gregory, Matthew matt.gregory at oregonstate.edu
Wed Jan 24 11:10:13 PST 2018


Hi all,

I came across what I think is a bug on reading in VAT tables using the AIG driver.  I have a raster attribute table that has fixed numeric types for some items and when using the GetTypeOfCol method (in Python), I'm getting back GFT_String (2) values.  I think I can trace it to lines 463-480 in aigdataset.cpp.  As it's looping through the fields, the type is set to GFT_String by default and only AVC_FT_BININT and AVC_FT_BINFLOAT are checked to possibly change type.  It seems like there should also be these checks/conversions:

  AVC_FT_DATE -> GFT_Date(?)
  AVC_FT_FIXINT -> GFT_Integer
  AVC_FT_FIXNUM -> GFT_Real

I could be missing the reasoning of why these types shouldn't crosswalk to the suggested GFT_* values, so I haven't submitted as a bug.

thanks, matt
 



More information about the gdal-dev mailing list