Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#5232 closed defect (fixed)

Fix Serialize method for Attribute Table to return NULL when no rows or columns

Reported by: Sam Gillingham Owned by: ilucena
Priority: normal Milestone: 1.11.0
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

Currently gdalinfo shows a "<GDALRasterAttributeTable />" node for each band when there is nothing in the RAT.

The problem is that with the RFC40 changes the HFA driver always returns something from GetDefaultRAT even if it is an empty table - you can now start writing data directly into the table with the returned object.

Attached is a patch to prevent the Serialize() method returning anything when the row and column count is zero

Attachments (1)

gdal_rat.cpp.patch (432 bytes ) - added by Sam Gillingham 11 years ago.
Patch to make Serialize return NULL when no rows or columns in RAT

Download all attachments as: .zip

Change History (5)

by Sam Gillingham, 11 years ago

Attachment: gdal_rat.cpp.patch added

Patch to make Serialize return NULL when no rows or columns in RAT

comment:1 by ilucena, 11 years ago

At revision: 26399

comment:2 by Kyle Shannon, 11 years ago

Ivan, a couple of tests are failing now and probably need to be updated in autotest/gcore/gdal_api_proxy.py. gdal_api_proxy_(1|2|3) all fail now and all have to do with RAT.

comment:3 by Even Rouault, 11 years ago

Resolution: fixed
Status: newclosed

I was tired of the travis bots spamming me about failed builds, so ...r26416 "Fix failed tests after changes done in #5232 and #5119"

comment:4 by Even Rouault, 10 years ago

Milestone: 2.01.11.0
Note: See TracTickets for help on using tickets.