Hello,

I'm not sure what version of geotools you are using. If you are using a
2.3.x or later version, there is an example of how to build and show
layers in the org.geotools.demo.introduction package. In general you
will need to build a full feature to be able to operate on it with
Geotools.

--adrian

On Tue, 2006-12-12 at 15:32 -0200, Paulo Manabe wrote:
> 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


-------------------------------------------------------------------------
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