<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Segoe UI";
panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Segoe UI",sans-serif;
color:black;
font-weight:normal;
font-style:normal;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Segoe UI",sans-serif;
color:black;
font-weight:normal;
font-style:normal;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:862086672;
mso-list-type:hybrid;
mso-list-template-ids:-1235689132 69009423 69009433 69009435 69009423 69009433 69009435 69009423 69009433 69009435;}
@list l0:level1
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="SV" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">I am adding support for Raster Attribute Tables for one of our products, and there are some things I wonder about.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">I have noticed that a TIFF file, Filename.tif, may have Raster Attribute Tables stored in
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">a
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">sidecar file of at least three types:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo2"><![if !supportLists]><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">Filename.tif.vat.dbf<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo2"><![if !supportLists]><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">Filename.tif.aux.xml<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo2"><![if !supportLists]><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black"><span style="mso-list:Ignore">3.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">Filename.aux<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">Are there other conventions for storing Raster Attribute Tables for TIFF files that I ought to know about?
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">I understand that .vat.dbf is an Esri convention using the old dBase format, not (yet) supported by GDAL Library for Raster Attribute Tables. Fair
enough. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">It would seem that the .aux.xml format was designed by GDAL developers, although I haven’t found any documentation on the history of the format. Esri
documentation says: “ArcGIS 9.2 introduced the AUX.XML file for certain file formats”, which can be understood as saying the format was invented by Esri, but I suspect they really mean something like “ArcGIS 9.2
<i>adopted</i> the AUX.XML format that was introduced by GDAL Library…”. Any comments on that?
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">The files named Filename.aux are a mystery to me. Esri documentation says: “The information stored in an AUX file is only accessible using a product
from Esri, ERDAS, or a third-party product derived from the RDO/ERaster library.” But I have found examples of datasets for which GDAL Library can retrieve a Raster Attribute Table from a binary Filename.aux. So, maybe some developer of GDAL Library has reverse-engineered
the Esri Filename.aux format, but I haven’t found any documentation of that. Or I guess maybe there are two distinct file formats that use the “.aux” file extension – the name “aux” isn’t very creative and maybe Esri never bothered to trademark it. Does anyone
know? <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">Finally, I have found several datasets of land cover with Raster Attribute Tables, both Australian (</span><span lang="EN-US"><a href="https://data.gov.au/dataset/1556b944-731c-4b7f-a03e-14577c7e68db/resource/1f8174f8-573e-43f2-b110-3d1a13c380e8">https://data.gov.au/dataset/1556b944-731c-4b7f-a03e-14577c7e68db/resource/1f8174f8-573e-43f2-b110-3d1a13c380e8</a></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">)
and American (</span><span style="font-size:9.0pt;font-family:"Verdana",sans-serif;color:#444444"><a href="https://datagateway.nrcs.usda.gov/GDGHome_DirectDownLoad.aspx"><span lang="EN-US">https://datagateway.nrcs.usda.gov/GDGHome_DirectDownLoad.aspx</span></a></span><span lang="EN-US" style="font-size:9.0pt;font-family:"Verdana",sans-serif;color:#444444">,
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">see
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">“</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">National Land Cover Dataset by State</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">”</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">),
where there are .aux.xml files that don’t seem to be GDAL-compliant. Maybe that’s just the way things are, but I haven’t seen these issues discussed, so I’ll mention them here (I am not sure if they merit filing a GDAL ticket). I have been using GDAL version
2.</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">2.3</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">, by the way.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:#444444"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif">A) GDAL Library always assumes that fields tagged as RED, GREEN and BLUE contain integers.
<o:p></o:p></span></b></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif">A common problem, for example in the files
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-indent:65.2pt"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif">DLCDv1_Class1_CEN.tif.aux.xml<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif">and<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:65.2pt"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif">DLCDv1_Class_alb94.tif.aux.xml,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif">in the Australian dataset,
<span style="color:black">is that </span>there are field definitions<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> <FieldDefn index="3"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> <Name>RED</Name><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> <Type>1</Type><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> <Usage>6</Usage><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> </FieldDefn><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> <FieldDefn index="4"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> <Name>GREEN</Name><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> <Type>1</Type><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> <Usage>7</Usage><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> </FieldDefn><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> <FieldDefn index="5"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> <Name>BLUE</Name><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> <Type>1</Type><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> <Usage>8</Usage><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> </FieldDefn><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif">The Type = 1 indicates that the fields are Float values, which is correct – the values are Float numbers in the range 0.0 to 1.0 – and the Usage = 6, 7 and 8
indicates that these fields are special Red, Green and Blue fields, which is also correct, semantically. (The integers giving Type and Usage seem to be zero-based indexes into the enumeration types GDALRATFieldType and GDALRATFieldUsage, see</span><span lang="EN-US">
<a href="https://www.gdal.org/gdal_8h.html#a810154ac91149d1a63c42717258fe16e">https://www.gdal.org/gdal_8h.html#a810154ac91149d1a63c42717258fe16e</a> )</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif">Unfortunately, GDAL Library assumes or demands that a field with Usage tagged as Red/Green/Blue always contains integers. When I read the files via GDAL Library,
what happens is that the Usage = 6, 7 and 8 forces the columns to be erroneously interpreted as integers (in the expected range 0 to 255), overriding the correct Type = 1 meaning Float. All values are then retrieved as 0 or 1, it seems. This can be seen from
the code lines <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:green">// color columns should be int 0..255</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue">if</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black">( (
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:gray">eFieldUsage</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black"> ==
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:darkslategray">GFU_Red</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black"> ) || (
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:gray">eFieldUsage</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black"> ==
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:darkslategray">GFU_Green</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black"> ) ||<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black"> (
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:gray">eFieldUsage</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black"> ==
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:darkslategray">GFU_Blue</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black"> ) || (
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:gray">eFieldUsage</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black"> ==
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:darkslategray">GFU_Alpha</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black"> ) )<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:black">{<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:gray">eFieldType</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> =
</span><span style="font-size:9.5pt;font-family:Consolas;color:darkslategray">GFT_Integer</span><span style="font-size:9.5pt;font-family:Consolas;color:black">;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif">in the method</span><span lang="EN-US">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">GDALDefaultRasterAttributeTable</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black">::CreateColumn()
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif">in</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span lang="EN-US" style="font-size:12.0pt;color:black"><a href="https://github.com/OSGeo/gdal/blob/master/gdal/gcore/gdal_rat.cpp">https://github.com/OSGeo/gdal/blob/master/gdal/gcore/gdal_rat.cpp</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">Although the behaviour agrees with the documentation of
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif">GDALRATFieldUsage that says that the special color fields must contain integers, I feel that GDAL Library is too rigid here. The Type, available in the Field Definition, tells
us whether a color field contains integers or floats, so why the restriction? I guess I could make GDAL read these field contents as floats if I changed the Usage to 0, meaning a general-purpose field, but that would remove the information that these fields
really are the special color fields. <span style="color:#444444"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:#444444"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif">B) Wrong Usage for the VALUE column.<o:p></o:p></span></b></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif">In this case, I feel certain that the data producers are doing things wrong, but there are so many of them…
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif">The special
<i>Value</i> field is declared as <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> <FieldDefn index="1"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> <Name>VALUE</Name><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> <Type>0</Type><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> <Usage>0</Usage><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> </FieldDefn><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif">Here, the Usage = 0 indicates just a general purpose field. But they should have declared<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> <Usage>5</Usage><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif">which indicates the usage
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">GFU_MinMax</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif">, saying this column contains the “class value”. Without that special usage indicated,
GDAL Library has no way of knowing that </span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">VALUE</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif"> is the special
<i>Value</i> column, so it uses the row number as the value instead. Unfortunately, the row numbering starts from 0, whereas the contents of the
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">VALUE</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif"> field are often numbers starting from 1, and sometimes the
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">VALUE</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif"> contents are not consecutive integers anyway.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif">I am not sure if it makes sense to make GDAL Library more tolerant for this kind of error. I guess it could use a rule of thumb, saying that if nothing else in
the .aux.xml tells what the special <i>Value</i> field is, and if the first or second field is of type integer and is named
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">“VALUE”</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif"> or
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">“Value”</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif"> or
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">“value”</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif">, then that is the special
<i>Value</i> field. But maybe such guesswork is just ugly. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif">I’d appreciate any comments and advice!
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">Regards,
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><b><span lang="EN-US" style="font-size:10.0pt;line-height:115%;font-family:"Segoe UI",sans-serif;color:#60C32F">Mikael Rittri</span></b><span lang="EN-US" style="font-size:10.0pt;line-height:115%;font-family:"Segoe UI",sans-serif;color:black"><br>
</span><b><span lang="EN-US" style="font-size:8.0pt;line-height:115%;font-family:"Segoe UI",sans-serif;color:#60C32F">Carmenta Geospatial Technologies</span></b><span lang="EN-US" style="font-size:8.0pt;line-height:115%;font-family:"Segoe UI",sans-serif;color:black"><br>
<a href="http://www.carmenta.com/"><span style="color:black">www.carmenta.com</span></a><o:p></o:p></span></p>
</div>
</body>
</html>