I need to create a shape file with custom attribues. Particularly my problem is about Double that is write like Number,33,31
and I need Number,10,3
.
I'm using SimpleFeatureTypeBuilder
for create the fields definitions an to method buildFeatureType()
for build it.
Is there any chance to do it with org.geotools
?
SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();
builder.setName("Location");
builder.setCRS(DefaultGeographicCRS.WGS84);
java.lang.Class<?> colClass = java.lang.Class.forName(geometryClass);
builder.add("the_geom", colClass);
for (Entry<String, java.lang.Class<?>> m : map.entrySet()) {
if (!GeometryConverter.isGeometryType(m.getValue().getClass())) {
builder.add(m.getKey(), m.getValue());
}
}
// build the type
final SimpleFeatureType LOCATION = builder.buildFeatureType();
return LOCATION;