[gdal-dev] Integer overflow issue in ogr2ogr

Dan Putler dan.putler at sauder.ubc.ca
Wed Mar 23 19:33:44 EDT 2011


All,

I'm working with the topological faces from the 2010 Tiger shapefile 
data. Some of the faces are huge in Alaska (over 2147483647 meters^2, 
which exceeds the size of a signed 32 bit integer). In the block face 
attribute table the area of each face is given. When I process a file 
with these large areas with ogr2ogr, the resulting attribute table has 
area values that have been converted from the large value to -2147483648 
(the largest, in absolute value, possible negative value of a 32 bit 
signed integer). I'm using GDAL 1.7.3 on Ubuntu 10.4 64 bit which I 
obtained from the Ubuntu GIS repository (1.8.0 has not made it to the 
Ubuntu GIS repository yet). My question really is whether there is a 
work around, say processing the file beforehand in a way that converts 
the large integers to double precision values.

Dan


More information about the gdal-dev mailing list