Opened 19 years ago

Closed 14 years ago

#797 closed defect (duplicate)

Integer field with values larger than can be held in a 32bit integer

Reported by: asger@… Owned by: warmerdam
Priority: high Milestone:
Component: OGR_SF Version: unspecified
Severity: normal Keywords:
Cc:

Description (last modified by warmerdam)

The problem regards attribute integer precision when using ogr to read
shapefiles having an effectively integer field with values larger than can be
held in a 32bit integer.

In the example data found at http://www.jo-informatik.dk/tmp/gdal_example.zip
there is a column named ("ID") which ArcGIS reports as "double(15,0)", and it
holds a positive integer with 15 digits (12080000240330).
Ogr2ogr maps this column to "numeric(15)" in postgres, but the value 
it actually puts into the table is negative and only 10 digits (-1742763318).

Change History (3)

comment:1 by asger@…, 19 years ago

It seems as if the current cvs allows for transferring double(15,0) shape
attributes correctly to postgis.

comment:2 by uffe@…, 18 years ago

(In reply to comment #1)
> It seems as if the current cvs allows for transferring double(15,0) shape
> attributes correctly to postgis.

The ogr2ogr application (part of fwtools 1.0.7, 10-nov-2005) do  still not 
handle this. When several SHP files are merged a Numeric(15,0) field ends up 
with negative numbers.

comment:3 by warmerdam, 14 years ago

Description: modified (diff)
Resolution: duplicate
Status: newclosed

I'm making #3615 the official ticket to address wide integer fields in dbf.

Note: See TracTickets for help on using tickets.