sgebh wrote:
> Hallo,
> I already posted this problem previously. Anyway, I figured out what might
> be the reason. Still I can't find the solution. I have several polygons and
> want to write them to shapefile. The shapefiles along with the attributes I
> defined are created, but no features in there. There seems to be a problem
> with polygon and multipolygon which I cant figure out. Here is the error
> stack trace and code examples. Please help. Thanks steffen.
>
My guess is "My Name" is not valid for shapefiles .. actually are you
using that as a "feature id"?
> org.geotools.data.DataSourceException: Could not create out out of provided
> feature: My Name
>
> Feature feature = TYPE.create(new Object[] { polygon, 12, "aname" }, "My
> Name");
>
Change this line to
Feature feature = TYPE.create(new Object[] { polygon, 12, "aname" } );
Cheers,
jody
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users