Hello,
We are using the GeoTools java libraries in version 2.4.1 to export data's
from an Oracle 10g database to shapefiles.
For the geometric data's (SHP), everything is OK.
But we have a problem for the alphanumerical data's (DBF): in the Oracle
database, number format is NUMBER(8,0) and it becomes a DOUBLE in the DBF
file.
Here is the java code we use to do it:
File fileExport = new File(System.getProperty("user.dir") + "\\" +
strShape);
// create a new shapefile data store
newShapefileDataStore = new ShapefileDataStore(fileExport.toURI().toURL());
// create the schema based on the original shapefile
newShapefileDataStore.createSchema(features.reader().getFeatureType());
// grab the feature source from the new shapefile data store
FeatureSource newFeatureSource =
newShapefileDataStore.getFeatureSource(oraDatastore.getTypeNames()[0]);
// downcast FeatureSource to specific implementation of FeatureStore
FeatureStore newFeatureStore = (FeatureStore)newFeatureSource;
// add features got from the query (FeatureReader)
newFeatureStore.addFeatures(fsBC.getFeatures());
Does anyone know how to fix this problem and where it's possible to store
the format we want to have for the alphanumerical data's in the created DBF
file.
Thanks in advance.
Damien.
--
View this message in context:
http://www.nabble.com/Number-format-in-created-DBF-file-tp20338623p20338623.html
Sent from the geotools-devel mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel