<div dir="ltr">Hello,<div><br></div><div><font face="arial, helvetica, sans-serif">I just discovered strange behavior of Polygonize function in JAVA bindings to GDAL.</font></div><div><font face="arial, helvetica, sans-serif">The function do not create the<font color="#000000"><span style="font-size:12px"> attribute in which the value of raster is stored as it is described in <a href="http://www.gdal.org/gdal_polygonize.html">http://www.gdal.org/gdal_polygonize.html</a> . </span></font></font></div>
<div><font color="#000000" face="arial, helvetica, sans-serif"><span style="font-size:12px"><br></span></font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="font-size:12px">After performing the function on a raster GeoTIFF file the it seems that the value of the raster is not passed to the resulting features.</span></font></div>
<div><font face="arial, helvetica, sans-serif"><font color="#000000"><span style="font-size:12px">The method GetFieldAsDouble("DN") gives: ERROR 1: No such field: 'DN'. Additionally the feat.GetFieldCount() gives 0. When I try to print the field with ID 0 (GetFieldAsDouble(0)</span></font><span style="font-size:12px;color:rgb(0,0,0)">) I get consecutive numbers from 0 to the total number of polygons which were 'discovered'. </span></font></div>
<div><font face="arial, helvetica, sans-serif"><span style="font-size:12px;color:rgb(0,0,0)"><br></span></font></div><div>I use:</div><div>GDAL 1.11.0</div><div>jdk 1.7u55</div><div><span style="color:rgb(0,0,0);font-family:Verdana,Helvetica,sans-serif;font-size:13px">Apache Ant 1.9.4</span><br>
</div><div>swig-3.0.1<span style="color:rgb(0,0,0);font-family:Verdana,Helvetica,sans-serif;font-size:13px"><br></span></div><div><br></div><div>JAVA bindings compiled using VS 9.0 on Win7 64bit machine</div><div><br></div>
<div><font face="arial, helvetica, sans-serif"><span style="font-size:12px;color:rgb(0,0,0)">Best regards,</span></font></div><div><font face="arial, helvetica, sans-serif"><span style="font-size:12px;color:rgb(0,0,0)">Mateusz</span></font></div>
<div><span style="font-size:12px;color:rgb(0,0,0)"><font face="arial, helvetica, sans-serif"><br></font></span></div><div><span style="font-size:12px;color:rgb(0,0,0);font-family:'Lucida Grande',Verdana,Geneva,Arial,sans-serif"><br>
</span></div><div><br></div></div>