Opened 17 years ago
Closed 14 years ago
#1627 closed defect (duplicate)
Shapelib: handling of Integers wider than 10 digits
Reported by: | Kosta | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | Markus Neteler |
Description
In the function DBFGetFieldInfo() (dbfopen.c: 960) an original "Integer" type is "cast" to the "Double" type, if the given field width of the Integer is larger than 10.
I think, that this is not the optimal solution, since the precision of doubles is also limited (~15-16 digits). I would suggest to use as target type "String" instead, which can handle an "arbitrarily" number of digits.
This problem occured during the import of some TeleAtlas shapefiles, which use 15 or even 22 integer digits as object IDs, to identify objects across different file sets...
Another (and even better) fix would be to use a C/C++ integer type of 64 bit precision for the OGR data type OFTInteger, but that would involve a large number of changed source code locations...
Attachments (1)
Change History (3)
by , 17 years ago
Attachment: | shapefile_large_int.patch added |
---|
comment:2 by , 14 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
I'm making #3615 the official ticket to address wide integer fields in dbf.
Bug fix for "large integer" support for Shapefiles