<div dir="ltr"><div><font face="verdana, sans-serif">Hi, everybody:</font></div><div><font face="verdana, sans-serif"><br></font></div><font face="verdana, sans-serif">add one more question :</font><div><font face="verdana, sans-serif"> </font></div><div><font face="verdana, sans-serif">the field name can be read 10 ascii characters, the last characters would be </font></div><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif">trimmed, is there anyone encounter this problem?</font></div><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif">any help would be appreciated!</font></div><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif"> Jhon Chen</font></div><div><font face="verdana, sans-serif"><br></font></div><div class="gmail_extra"><font face="verdana, sans-serif"><br></font><div class="gmail_quote"><font face="verdana, sans-serif">On Mon, Oct 12, 2015 at 3:43 PM, Jhon Chin <span dir="ltr"><<a href="mailto:giantchen2010@gmail.com" target="_blank">giantchen2010@gmail.com</a>></span> wrote:<br></font><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><font face="verdana, sans-serif">Hi, everybody:</font></div><div><font face="verdana, sans-serif"><br></font></div><font face="verdana, sans-serif">I'm now trying to write polygonized result into an esri shapefile, and I tried </font><div><font face="verdana, sans-serif"><br></font><div><font face="verdana, sans-serif">to add some field to the attribute table in the shapefile. But it corrupted </font></div><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif">when i was trying to create an <b><font size="4">ogrfielddefn</font></b> instance.The code goes </font></div></div><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif">like this:</font></div><div><font face="verdana, sans-serif"> OGRFieldDefn oField("归一化植被指数",OFTInteger);</font></div><div><font face="verdana, sans-serif"> if(poLayer->CreateField(&oField) != OGRERR_NONE)</font></div><div><font face="verdana, sans-serif"> {</font></div><div><font face="verdana, sans-serif"> printf("create 归一化植被指数 failed!");</font></div><div><font face="verdana, sans-serif"> exit(1);</font></div><div><font face="verdana, sans-serif"> }</font></div></div>
</blockquote></div><br></div></div>