Re: [Geotools-gt2-users] Precision and scale from a real field in a shape file

2011-05-29 Thread Larry Reeder
Since field length and degrees of precision are all stored in the DBF part of the shapefile, one approach is to use the low-level GeoTools classes DbaseFileReader, and DbaseFileWriter to parse and update the DBF file. Both of those classes make use of a utility class called DbaseFileHeader with me

Re: [Geotools-gt2-users] Precision and scale from a real field in a shape file

2011-05-26 Thread Jody Garnett
The good news is that our descriptors have a "user data" map; which we can use to store any extra information from the header that you need (and pass it back out to your program). -- Jody Garnett -- vRanger cuts backup

Re: [Geotools-gt2-users] Precision and scale from a real field in a shape file

2011-05-26 Thread Jose C. Martinez-Llario
El 26/05/2011 16:30, Jody Garnett escribió: Ah. The information is I think in the shapefile header; we do parse that shapefile header information into the AttributeDescriptor/AttributeType information (length as you found is captured as a filter "restriction"). I am not sure how much detail i

Re: [Geotools-gt2-users] Precision and scale from a real field in a shape file

2011-05-26 Thread Jody Garnett
Ah. The information is I think in the shapefile header; we do parse that shapefile header information into the AttributeDescriptor/AttributeType information (length as you found is captured as a filter "restriction"). I am not sure how much detail is provided in the shapefile format about float

Re: [Geotools-gt2-users] Precision and scale from a real field in a shape file

2011-05-26 Thread Jose C. Martinez-Llario
Hi Jody, Sorry I didnt explain myself in a good way. nono..Im not asking about how i can get a field value from a shapefile..of course im not going to ask that with allthe geotools documentation on the internet. Lets say I have a field called 'field1' and it has 20 digits of precision and 8 d

Re: [Geotools-gt2-users] Precision and scale from a real field in a shape file

2011-05-26 Thread Jody Garnett
Bah this silly email program sends messages when I give up and close an email. Can I assume that scale is an attribute you are trying to access? I am having a hard time answering your questions; as working with fields of different types works well with GeoTools shapefile support. You should be

[Geotools-gt2-users] Precision and scale from a real field in a shape file

2011-05-26 Thread Jose C. Martinez-Llario
Dear GeoTools users, I am trying to read a shape file using geotools and everything is working well. I couldnt find out how to read the scale from a real field though. For reading the precision I get the field restricctions and then I parsed each element on the list (filter.toString()) looking