Re: [JPP-Devel] Shapefile field length

2010-05-21 Thread Michaël Michaud
Larry Becker a écrit : > If there is no further discussion, shall I go ahead and change DBF > integers from 16 to 11 bytes? Yes please, go ahead Michaël > > Larry > > On Wed, May 19, 2010 at 4:26 PM, Larry Becker > wrote: > > Hi Michaël, > > I agree that

Re: [JPP-Devel] Shapefile field length

2010-05-21 Thread Stefan Steiniger
I am not an expert - but if just one other person agrees (Michael?) then sure... Larry Becker wrote: > If there is no further discussion, shall I go ahead and change DBF > integers from 16 to 11 bytes? > > Larry > > On Wed, May 19, 2010 at 4:26 PM, Larry Becker

Re: [JPP-Devel] Shapefile field length

2010-05-21 Thread Larry Becker
If there is no further discussion, shall I go ahead and change DBF integers from 16 to 11 bytes? Larry On Wed, May 19, 2010 at 4:26 PM, Larry Becker wrote: > Hi Michaël, > > I agree that 24,15 for doubles is insufficient to prevent all overflows. > In fact I just did an experiment and 33,16 is

Re: [JPP-Devel] Shapefile field length

2010-05-19 Thread Larry Becker
I do see a possible solution to the problem of limiting field sizes when saving changes to shapefiles. If it is an existing shapefile, and the user is simply making changes, then the "Save Selected Datasets" option will be used. We could simply create a new version that included the option to kee

Re: [JPP-Devel] Shapefile field length

2010-05-19 Thread Larry Becker
Hi Michaël, I agree that 24,15 for doubles is insufficient to prevent all overflows. In fact I just did an experiment and 33,16 is also too small. I think it should be 34, 16. Regarding compatibility of numeric size, I found conflicting references. Most drivers are probably reasonably tolera

Re: [JPP-Devel] Shapefile field length

2010-05-19 Thread Michaël Michaud
Hi, Good catch Larry. I have changed that for integers at a time, but lost it when JUMP moved to OpenJUMP. From this doc, Numeric types should not be more than 18/20 bytes length, (which is quite restrictive) : http://www.clicketyclick.dk/databases/xbase/format/data_types.html#DATA_TYPES I alw

Re: [JPP-Devel] Shapefile field length

2010-05-19 Thread Larry Becker
I just had a look at the package com.vividsolutions.jump.feature.AttributeType and found: /** For long values (64-bit) */ public final static AttributeType INTEGER = new AttributeType("INTEGER", Integer.class); The comment is at odds with the type, and I can't see why ShapeFileWriter allo

Re: [JPP-Devel] Shapefile field length

2010-05-18 Thread totenfeier
Hi Stefan, i'm sorry if i wasn't clear enough. The first row af a dbf file describes the content of each column. For an area field we can have "AREA,N,6" and 6 is what i mean as field size. I need to change this value from the standard "16" that openjump uses. Thanks! Michele > Hei, > > I would

Re: [JPP-Devel] Shapefile field length

2010-05-17 Thread Larry Becker
I aggree with Michaël. This is a non-trivial task. I would propose that if it is ever attempted, it should be implemented as a special layer type, as with database layers. This "ShapeFileLayer" type could also be the perfect place to implement loading the subset of the shapefile that is within t

Re: [JPP-Devel] Shapefile field length

2010-05-17 Thread Michaël Michaud
Hi, I did a bit of work in the past to add new datatypes in OpenJUMP like char(fixedlength) or decimal, but I abandonned this work. There are several reasons for that : - my needs changed :-( - adding new datatypes was really a pain, because "AttributeType" class is used everywhere in the code (

Re: [JPP-Devel] Shapefile field length

2010-05-17 Thread luca marletta
Hi, I also would need this feature maybe for same kind of application. to better explain it's the feature that, like in QGIS if i remember well, when you define a new layer it asks to save it as shape defining from the early beginning the dbf fields with every type and length (for instance "name" S

Re: [JPP-Devel] Shapefile field length

2010-05-17 Thread Stefan Steiniger
Hei, I would say "no" - but I am also not sure if I understand correctly what you mean by "length of a integer field". stefan Totenfeier wrote: > Hi all! > i'm a fellow worker of Politecnico di Milano and i'm working on a > project that need to manage field length of a shapefile. > Notably i h

[JPP-Devel] Shapefile field length

2010-05-17 Thread Totenfeier
Hi all! i'm a fellow worker of Politecnico di Milano and i'm working on a project that need to manage field length of a shapefile. Notably i have to set different dimension of integer fields in a dbf file. I'm wondering if this is possible with Openjump now or somebody is working on that. Thank