Hi group,

I need to create a Layer passing a geometry that I finished to convert of
SDO to JTS. The only class that I found to pass geometry was the
DefaultFeatureCollection, but its constructor is protected....As I can
create the map with my geomtries?

this code:

        JTS = toGeometry(tipo,srid,new double[0],elementinf,ordinatesarray);

        StyleBuilder sb = new StyleBuilder();

        LineSymbolizer lineSym = sb.createLineSymbolizer(Color.RED,1);
        Style style = sb.createStyle(lineSym);
        MapContext mc = new DefaultMapContext();
        FeatureCollection fs = new DefaultFeatureCollection(null,null);
        fs.setDefaultGeometry(JTS);
        mc.addLayer(fs,style);

throws this Exception : Error(173,36): constructor
DefaultFeatureCollection(java.lang.String, org.geotools.feature.FeatureType)
has protected access in class org.geotools.feature.DefaultFeatureCollection

Paulo Manabe



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to