Opened 4 years ago

Closed 4 years ago

Last modified 4 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 4 years ago.
Patch to make Serialize return NULL when no rows or columns in RAT

Download all attachments as: .zip

Change History (5)

Changed 4 years ago by Sam Gillingham

Attachment: gdal_rat.cpp.patch added

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

comment:1 Changed 4 years ago by ilucena

At revision: 26399

comment:2 Changed 4 years ago by Kyle Shannon

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 Changed 4 years ago by Even Rouault

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 Changed 4 years ago by Even Rouault

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