Hi list,
i am facing some problems when i try to create new polygon features out 
of a  java polygon, this is my code:

        Feature feature = null;
        Geometry geom = null;
        geom = convertToJTSGeometry(poly, toWorld);
        try{
            AttributeType attr = 
AttributeTypeFactory.newAttributeType("the_geom", Polygon.class);
            FeatureTypeBuilder ftBuilder = 
FeatureTypeBuilder.newInstance("ez");
            ftBuilder.addType(attr);
            type = ftBuilder.getFeatureType();
            feature = type.create(new Object[]{geom});
        }
        catch(Exception e) {
            throw e;
        }
An Exception raises in feature = type.create(new Object[]{geom});
IllegalAttribute: java.awt.Polygon , but got 
com.vividsolutions.jts.geom.Polygon

any ideas?

thanks in advance,

Laura


-------------------------------------------------------------------------
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to