Please be sure to reply to the udig-devel list. I cannot offer you direct email support (as you are not my customer - however you are welcome to check out the commercial support options).
The Style objects have all the instructions. I recommend you review in detail the following code from GeoTools: - http://svn.osgeo.org/geotools/trunk/modules/library/render/src/main/java/org/geotools/renderer/lite/StreamingRenderer.java The design shows how to process features into Java Shape + the required styles for colour; line thickness; stipple patterns and everything else. You should be able to reuse then when targeting JOGL or other 3D backend. There is one alternative; make use of a Graphic2D adapter. This approach is used when generating SVG using Batik or PDF using iText. Many of the 3D implementations do allow you to directly "draw" into your scene graph. Documentation on rendering and styles is here: - http://docs.geotools.org/latest/userguide/library/render/index.html -- Jody Garnett On Tuesday, 18 October 2011 at 5:10 PM, Alberto Debiasi wrote: > Actually I try to visualize features in a 3D context, thus I need the > geometry and the colour of each feature... > Do you think the best way to do it is to perform the same query? How can I > retrieve that? > > Alberto > > 2011/10/18 Jody Garnett <[email protected] > (mailto:[email protected])> > > Perhaps I should ask - why do you need the colour? > > > > You can grab the colour of a pixel on the screen; or even on the bitmap you > > draw a feature onto. But a feature by itself has no colour - it is just > > data. Drawing the feature on the screen uses colour; and you can control > > the drawing process. > > > > You can perform the same query the drawing routine does in order to > > determine the colour for a feature (if that is of any help to you). > > > > Perhaps you could be specific about what you want to accomplish; right now > > it seems like you are trying to lift water with a fork. > > > > -- > > Jody Garnett > > > > > > On Monday, 17 October 2011 at 11:32 PM, Alberto Debiasi wrote: > > > > > So is it impossible to retrieve the color of a selected feature?!?! > > > > > > 2011/10/17 Jody Garnett <[email protected] > > > (mailto:[email protected])> > > > > The color is generated from a small recipe called 'style' it provided a > > > > lot of control. Often the color is made from a formula called an > > > > expression. > > > > > > > > Examples are "#0000FF" or a function call mapping values to a color or > > > > if your attribute is already a color you can refer to it by name. > > > > > > > > Next time you are in uDig style editor have a look. > > > > > > > > But yeah features do not have a colour indeed they are an object and > > > > not even held in memory during rendering. > > > > > > > > Jody Garnett > > > > > > > > On 17/10/2011, at 10:48 PM, Alberto Debiasi <[email protected] > > > > (mailto:[email protected])> wrote: > > > > > > > > > Hello everybody, > > > > > I have a question: > > > > > > > > > > In udig it's possible to modify the "style" of a resource (select > > > > > resource ->left mouse button -> modify style). > > > > > In this way it's possible to define a color for each feature based > > > > > from a particolar attribute. > > > > > > > > > > My question is: in which way I can retrieve the color of each > > > > > resource? > > > > > > > > > > It doesn't exist for example the method: > > > > > > > > > > feature.getColor ???? > > > > > > > > > > Alberto > > > > > _______________________________________________ > > > > > User-friendly Desktop Internet GIS (uDig) > > > > > http://udig.refractions.net > > > > > http://lists.refractions.net/mailman/listinfo/udig-devel > > > > _______________________________________________ > > > > udig-users mailing list > > > > [email protected] > > > > (mailto:[email protected]) > > > > http://lists.refractions.net/mailman/listinfo/udig-users > > > > > >
_______________________________________________ User-friendly Desktop Internet GIS (uDig) http://udig.refractions.net http://lists.refractions.net/mailman/listinfo/udig-devel
