Hi list,
sorry for duplicated email, i think i posted it before to the wrong 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-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to