id summary reporter owner description type status priority milestone component version severity resolution keywords cc 1112 Integer fields overflow in shapefile driver Daniel Morissette warmerdam "{{{ mirza wrote: > Hello, > > When I try to convert shapefile to mid/mif using ogr2ogr, some double values are converted to (overflowed) integers. For example, value 14420300000144 in shapefile is converted to -1500011687 in .mid file. I submitted bug to MITAB project but same bug occurred when converting to CSV so maybe it is more general. Any idea? Frank replied: Mirza, This is an issue with the Shapefile driver. The problem is deciding how to handle integer fields that are so wide they might not fit in a 32bit integer. My decision some time ago was to pretend that these are doubles rather than deal with adding some sort of 64bit integer type to shapelib. This decision is at the base of the problems. You can file a bug against the OGR shapefile driver or even shapelib itself, but I haven't yet figured out what to do about it. Note that OGR's integer field is a 4byte integer so there is no way to represent large integers in OGR. Ugg. }}}" defect closed high OGR_SF unspecified normal duplicate