feature color

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

feature color

alcesgabbo
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

_______________________________________________
udig-users mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/udig-users
Reply | Threaded
Open this post in threaded view
|

Re: [udig-devel] feature color

Jody Garnett-2
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 <[hidden email]> 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
[hidden email]
http://lists.refractions.net/mailman/listinfo/udig-users
Reply | Threaded
Open this post in threaded view
|

Re: feature color

Mauricio Pazos-2
In reply to this post by alcesgabbo
On Monday, October 17, 2011 02:48:21 PM Alberto Debiasi 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?
You can apply a color to a layer.  Have a look at Workthrough 1 document
http://udig.refractions.net/confluence/display/EN/Walkthrough+1

>
> It doesn't exist for example the method:
>
> feature.getColor ????
The color is part of GUI behavior (view), and the feature is part of the gis
model. So, the feature does not support that getter method.

>
> Alberto
> ___________

cheers
--
Mauricio Pazos


_______________________________________________
udig-users mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/udig-users