[fdo-dev] SHP provider

Pierre Dalcourt pierre.dalcourt at autodesk.com
Fri Nov 10 10:14:06 EST 2006


FDO precision refers to the total number of digits a Decimal value can
store.

DBF precision (or width) refers to the the total number of ascii
characters a value can store.  Since a numeric value containing a
fraction will also contain a "." character, the total number of digits
you can store in a DBF numeric field (with a "." character) is one less
than the DBF precision stated.  This effect is even more pronounced if
the numeric value is negative since the '-' character also takes up one
character in the DBF field's precision/width..

 

Pierre

 

  _____  

From: Haris Kurtagic [mailto:haris at sl-king.com] 
Sent: November 10, 2006 6:13 AM
To: dev at fdo.osgeo.org
Subject: RE: [fdo-dev] SHP provider

 

Thanks, I didn't understood minus -1 for decimal, precision in FDO I
understood as number of digits ( without point char ) ?

And a quick thought, it looks to me that if -1 is doing for some reason,
it should do it on the scale ?

 

Anyhow, I will figure some workaround for this. This comes when I used
Fdo2Fdo to copy SHP to Oracle and Oracle is strict about this things.

 

Thanks,

Haris

 

  _____  

From: Pierre Dalcourt [mailto:pierre.dalcourt at autodesk.com] 
Sent: Friday, November 10, 2006 12:04 PM
To: dev at fdo.osgeo.org
Subject: RE: [fdo-dev] SHP provider

Hi Haris,

 

Likely this is an issue with the SHP file you are using.  The DBF column
you are referring to seems to have a width of 19 and a scale of 11.  SHP
provider knocks 1 off the width when scale>0 (to make room for the '.'
decimal point character which is stored in the field), which is why you
get an FDO Precision of 18 instead of 19.  The important thing is that
in general the DBF scale is really more of a 'hint' than a hard fact
since some (many?) applications ignore the DBF scale and just put any
number that fits into the field's width (the width itself is a true hard
limit, unlike the scale).  SHP Provider will allow you to read such
values (that don't match the scale) in the interest of not
filtering/modifying the actual data in your SHP/DBF files.

 

Pierre

 

  _____  

From: Haris Kurtagic [mailto:haris at sl-king.com] 
Sent: November 10, 2006 5:11 AM
To: dev at fdo.osgeo.org
Subject: [fdo-dev] SHP provider

 

Hi,

 

SHP provider is reporting decimal data type column with Precision 18 and
Scale 11. Problem is that value in that column is with 9 digits on left
side of decimal point.

 

Is this a issue in provider or ?

 

Thank you,

Haris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo-internals/attachments/20061110/71fc5f48/attachment.html


More information about the Fdo-internals mailing list