I couple suggestions for this bit of the code.
1) builder.init( ft ); // will copy all the stuff in so you can modify it
2) You may wish to go through the attribute descriptors as shapefiles operate
under different restrictions (such as string length) then postgreSQL.
Cheers!
--
Jody Garnett
On Saturday, 28 May 2011 at 1:29 AM, Eric Grosso wrote:
> SimpleFeatureType ft = shapeDataStore.getSchema(typeName);
>
> // feature type copy to set the new name
> SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();
> builder.setName(postgisTableName);
> builder.setAttributes(ft.getAttributeDescriptors());
> builder.setCRS(ft.getCoordinateReferenceSystem());
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users