I found it hard to follow your code due to your email program line wrapping?
> SimpleFeatureStore newfeatureStore = (SimpleFeatureStore) newfeatureSource;
> newfeatureStore.setTransaction(transaction);
> try {
> newfeatureStore.addFeatures(newcollection);
> transaction.commit();
> }
> catch (Exception problem){
> problem.printStackTrace();
> transaction.rollback();
> }
> finally {
> transaction.close();
> }
You can fix the PRJ warning by setting up your feature type to include a
CoordianteReference system
The part where you add features to look just like the csv to shapefile
tutorials; if
that is still running I am not sure why you would get your error?
What version of GeoTools are you running?
Jody
>
> but i get the following error:
>
> 14.06.2011 11:19:31 org.geotools.data.shapefile.ShapefileDataStore
> createSchema
> WARNUNG: PRJ file not generated for null CoordinateReferenceSystem
> java.io.IOException: Current fid index is null, next must be called before
> write()
> at
> org.geotools.data.shapefile.indexed.IndexedFidWriter.write(IndexedFidWriter.java:250)
> at
> org.geotools.data.shapefile.indexed.IndexedShapefileFeatureWriter.write(IndexedShapefileFeatureWriter.java:100)
> at
> org.geotools.data.shapefile.ShapefileFeatureWriter.close(ShapefileFeatureWriter.java:225)
> at
> org.geotools.data.shapefile.indexed.IndexedShapefileFeatureWriter.close(IndexedShapefileFeatureWriter.java:108)
> at
> org.geotools.data.TransactionStateDiff.applyDiff(TransactionStateDiff.java:276)
> at
> org.geotools.data.TransactionStateDiff.commit(TransactionStateDiff.java:146)
> at org.geotools.data.DefaultTransaction.commit(DefaultTransaction.java:182)
> at main.geometriefunktionen.AusgabeShape(geometriefunktionen.java:326)
> at main.funktionen.Generationenberechnung(funktionen.java:52)
> at main.start.main(start.java:74)
>
> i don“t know why?
> please help me!
> thanks a lot
> balli
>
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/Problems-by-creating-a-shapefile-tp6473348p6473348.html
> Sent from the geotools-gt2-users mailing list archive at Nabble.com
> (http://Nabble.com).
>
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> (mailto:[email protected])
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users