<div dir="ltr">Not focusing on ogr, but on shapefile:<div>Shapefile uses .dbf (dBase III) to store attributes (except geometrical attributes which are stored in the .shp file).</div><div>This format does not know about integers, only about numericals (type N or F), with a specifiable precision (how many number-positions) and number of decimals (behind the decimal separator), aka scale.</div>
<div>If this sounds textish, that is because it is: the numbers are stored in the file as text. N as a fixed point double, F - in principle, but in fact depending on implementation - uses scientific notation. When specifying these values (when creating a field), you typically count the non-numerical parts such as a - sign, the decimal separator and the exponent when using F to specify precision. Exponent, by default, but hard to change, uses 3 digits, and E and possibly a - (negative exponent).</div>
<div>I hope that explains why there is not an effective type Integer for shapefiles. There is no way for a (ogr)driver to invent one in the case of  shapefiles. The type integer is applicable by extension because in  other formats the distinction between numerical types is maintained more rigorously. Number of decimals = 0 should do the trick, but ArcGis will call it a double with some precision and scale 0. Can be used as integer without side-effects, so far I've noticed.</div>
<div>Jan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 16, 2014 at 5:05 PM, Ari Jolma <span dir="ltr"><<a href="mailto:ari.jolma@gmail.com" target="_blank">ari.jolma@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 06/04/2014 11:45 PM, taibc wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi everyone,<br>
<br>
I created the shape file by usinge the feature filed type: OFTInteger.<br>
<br>
But when I open the file in Arcgis (ArcCatalog) the data type is: Double<br>
(not integer).<br>
<br>
Do you know how to fix this (I want it is Int) ?<br>
</blockquote>
<br>
Dear Tai,<br>
<br>
This is a bit old email so I'll answer from my head. I believe you need to set the length of the Integer field to be short enough. If I remember correctly there is a ticket on the issue, but it is deemed as a feature, not a bug.<br>

<br>
Ari Jolma<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks and regards,<br>
Tai<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/Asking-about-feature-field-types-of-Shape-File-SHP-tp5144127.html" target="_blank">http://osgeo-org.1560.x6.<u></u>nabble.com/Asking-about-<u></u>feature-field-types-of-Shape-<u></u>File-SHP-tp5144127.html</a><br>

Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
______________________________<u></u>_________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/gdal-dev</a><br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/gdal-dev</a><br>
</blockquote></div><br></div>