[GRASS-user] r.in.gdal for importing categorical ArcGIS binary rasters

Markus Metz markus.metz.giswork at gmail.com
Fri Feb 21 08:12:34 PST 2014


On Fri, Feb 21, 2014 at 2:00 PM, Moritz Lennert
<mlennert at club.worldonline.be> wrote:
> On 21/02/14 11:30, Markus Metz wrote:
>>
>> On Fri, Feb 21, 2014 at 9:35 AM, Moritz Lennert
>> <mlennert at club.worldonline.be> wrote:
>>>
>>> On 20/02/14 22:14, Markus Metz wrote:
>>>>
>>>>
>>>> I would not replace a working gdal version with a probably not working
>>>> gdal version. Your gdalinfo reported a raster attribute table, not
>>>> mine. You could double-check again if your gdalinfo still finds a
>>>> raster attribute table, then import with r.in.gdal.
>>>
>>>
>>>
>>> Out of curiosity: if a table contains several columns which one(s) is/are
>>> imported and in what form do they appear in GRASS (I don't have a file
>>> here
>>> to test myself) ?
>>
>>
>> Each column has a dedicated usage. For "name" usage, the column is
>> treated as category labels. For any of the color usages, the column is
>> treated as corresponding red, green, or blue color. See also the gdal
>> documentation [0]. Currently, r.out.gdal exports category labels or
>> color rules to a raster attribute table with the new -t flag, and
>> r.in.gdal automatically imports any information it finds.
>>
>> Markus M
>>
>> [0] http://www.gdal.org/gdal_8h.html#a27bf786b965d5227da1acc2a4cab69a1
>
>
> So, IIUC you get the GFU_Name and the color information, but if the table
> contains several fields (which I guess will be of type GFU_Generic) these
> are ignored ?

GFU_Generic usage is ignored because it is unknown what this could be good for.

For importing categories, field usages GFU_Name + GFU_MinMax or
GFU_Name + GFU_Min + GFU_Max is needed.

For importing color rules, GFU_Min + GFU_Max + GFU_RedMin + GFU_RedMax
+ GFU_GreenMin + GFU_GreenMax + GFU_BlueMin + GFU_BlueMax (8 fields)
are needed, or GFU_MinMax + GFU_Red + GFU_Green + GFU_Blue (4 fields).

Markus M


More information about the grass-user mailing list