DbaseFileHeader bug in attribute class assignement

Description

DbaseFileHeader mistakes when a "number" type arrives: it always assigns "Integer" type.
If the number is too big, it could not fit into an Integer (as in my case), so I made this modification in getFieldClass:

case 'N':
if (fields
{
if (fields[i].fieldLength>9)
typeClass = Long.class;
else
typeClass = Integer.class;

}
else
{
typeClass = Double.class;
}
break;

Environment

None

Activity

Show:
codehaus
April 10, 2015, 3:04 PM

CodeHaus Comment From: monopoli - Time: Mon, 4 Oct 2004 07:53:39 -0500
---------------------
Sure I can! Sorry for the delay

codehaus
April 10, 2015, 3:04 PM

CodeHaus Comment From: monopoli - Time: Mon, 4 Oct 2004 07:59:25 -0500
---------------------
Ehmm... I don't find the link to upload a file

codehaus
April 10, 2015, 3:04 PM

CodeHaus Comment From: aaime - Time: Mon, 4 Oct 2004 16:29:02 -0500
---------------------
Can you send it to me then? <a href='andrea.aime@aliceposta.it'>andrea.aime@aliceposta.it</a>

A small one, please

codehaus
April 10, 2015, 3:04 PM

CodeHaus Comment From: jgarnett - Time: Sun, 5 Mar 2006 16:32:00 -0600
---------------------
This is a patch to allow larger numbers out of a shapefile.

codehaus
April 10, 2015, 3:04 PM

CodeHaus Comment From: aaime - Time: Sun, 23 May 2010 04:40:16 -0500
---------------------
The current code reads as:

So I guess the user suggestion was merged

Assignee

Unassigned

Reporter

codehaus

Triage

None

Components

Affects versions

Priority

High
Configure