Hi,

I am using geotools to export and import  a shapefile from/to a database.
The database contains a number field decimal(11,2), so the length is 11 and the scale is 2.

In my code the attribute is of type double.

When  I create a shapefile, the length is always 33 and the scale is 31.

I found the code in ShapefileDataStore.createDbaseHeader:

if (Number.class.isAssignableFrom(colType)) {
                int l = Math.min(fieldLen, 33);
                int d = Math.max(l - 2, 0);
                header.addColumn(colName, 'N', l, d);
    }

How can I circumvent this?

Thanks for any help

Rainer
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to