Hi Michaël,

Even Rouault answered me>


>> Why so many decimals in "id" and "attr"? Doesn't definition (11.0) in

>> dbf file mean that it has max 11 numbers and 0 decimals, thus it is an 
>> integer?



> Yes, but with 11 figures, you can have an integer that is more than a signed 
> 32 bit integer, hence the choice of the shapefile >driver to expose those 
> fields as real to avoid integer overflow.

I suppose there is no need to change OJ behaviour.

-Jukka-


Lähettäjä: Michael Michaud [mailto:m.michael.mich...@orange.fr]
Lähetetty: 19. toukokuuta 2014 20:22
Vastaanottaja: jump-pilot-devel@lists.sourceforge.net
Aihe: Re: [JPP-Devel] Integers stored by OpenJUMP become Real in GDAL

Hi Jukka,

Basic data types of dBase III format are :
C (Character)

All OEM code page characters.

D (Date)

Numbers and a character to separate month, day, and year (stored internally as 
8 digits in YYYYMMDD format).

N (Numeric)

- . 0 1 2 3 4 5 6 7 8 9

L (Logical)

? Y y N n T t F f (? when not initialized).

M (Memo)

All OEM code page characters (stored internally as 10 digits representing a 
.DBT block number).


AFAIK, OpenJUMP uses only C, D and N

For integers, it exports a numeric of length 11 with 0 decimals
For doubles, it exports a numeric of length 33 with 16 decimals
While reading a dbf, OpenJUMP reads column with 0 decimal as integers and 
columns with 1 decimal or more as double

That said, dbase format has evolved a lot since version III and binary integer 
may exist now,
Not sure that using other data types is a good idea though. In your case, I 
don't know if GDAL
looses the "number of decimal places", but this info is all we need to know if 
an attribute is
an integer or a double/decimal.

Michaël

Hi,



If I create an attribute of type integer in OpenJUMP and save the layer into 
shapefile, GDAL/OGR is reporting that the datatype is "real (11.0)". However, 
if I reload the shapefile back to OJ the datatype is still Integer. Do we write 
the integer datatype in some odd way or is it GDAL that interprets is wrongly?



-Jukka Rahkonen-



------------------------------------------------------------------------------

"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE

Instantly run your Selenium tests across 300+ browser/OS combos.

Get unparalleled scalability from the best Selenium testing platform available

Simple to use. Nothing to install. Get started now for free."

http://p.sf.net/sfu/SauceLabs

_______________________________________________

Jump-pilot-devel mailing list

Jump-pilot-devel@lists.sourceforge.net<mailto:Jump-pilot-devel@lists.sourceforge.net>

https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel





------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to