using attributes in the VAT table of an ESRI GRID instead of Value

Frank Warmerdam warmerdam at POBOX.COM
Thu Sep 13 09:25:27 EDT 2007


Julia Harrell wrote:
> Anyone ever find a way to use VAT fields?
> 
> I'd sure hate to have convert my statewide GRID to a giant statewide polygon
> vector layer just to be able to get at the extended VAT attributes. It would
> undoubtedly crawl when it comes to display and query speed, even tiled up
> and indexed...
> 
> Wondering if there is a way to convert the ESRI Binary GRID (integer, with a
> VAT) to an image and "repopulate" the pixel values to reflect what's in the
> desired VAT attribute field instead of the VALUE field, but I have not found
> a good example of the correct options/parameters to use with GDAL (or
> anything else) to accomplish this.

Julia,

I recently added support for accessing VATs through GDAL from Arc/Info
binary grid coverages.  It was part of a project with FAO where we
used mapscript to override the behavior of the WMS GetFeatureInfo
in MapServer to report values looked up from the VAT instead of
reporting the pixel values directly.

So, some of the machinery exists.  In particular:

  o The AIGRID driver in GDAL/OGR trunk (soon to be 1.5) can read
    the VAT from the info directory.

  o The GDAL Python/C#/Java/Ruby/Perl scripting interface now
    includes methods to access the VAT (called a raster attribute
    table in GDAL) and lookup values.

But MapServer does not have any built-in knowledge of the raster
attribute tables.  There is also no current GDAL utility to
reclassify (repopulate) a raster by passing it through the
attribute table.

If anyone is interested, I'm confident FAO would not mind my
publishing the Python script we used to wrap WMS to implement
the custom GetFeatureInfo using the VAT/RAT.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the mapserver-users mailing list