Re: [Geotools-gt2-users] Programmatically retrieving a feature property name

2009-03-06 Thread Benoît Thiébault
Got it ! I will try to keep a low profile ;-) But it's true I'm trying to understand all the tricks behind styling. It is really performance bottleneck. Did you know that drawing a 1 pixel width Line String was much faster than a 2 pixel width Line String ? In my particular case, refreshing

[Geotools-gt2-users] Programmatically retrieving a feature property name

2009-03-05 Thread Benoît Thiébault
Hi everyone, I am trying to build a style programmatically, and I would like the color of my line symbolizer to be retrieved from a feature attribute, like in the SLD sample below. Do you know how to do this ? UserStyle FeatureTypeStyle Rule

Re: [Geotools-gt2-users] Programmatically retrieving a feature property name

2009-03-05 Thread Justin Deoliveira
Hi Benoît, Looking at the style builder classes, it does not seem to be possible, as it does not expose a method that creates a stroke from an Expression. However you can get at the underlying style factory (getStyleFactory()), and should be able to manually build up the symbolizer,

Re: [Geotools-gt2-users] Programmatically retrieving a feature property name

2009-03-05 Thread Benoît Thiébault
Hi Justin, In fact, I just found a way to do it : // Temporary style Style style = null; // Style builder StyleBuilder sb = new StyleBuilder(); // Line symbolizer stroke Stroke stroke = sb.createStroke(sb.attributeExpression(color), sb.literalExpression(2.0)); // Line

Re: [Geotools-gt2-users] Programmatically retrieving a feature property name

2009-03-05 Thread Justin Deoliveira
Aha, very nice, much better than my suggestion :). -Justin Benoît Thiébault wrote: Hi Justin, In fact, I just found a way to do it : // Temporary style Style style = null; // Style builder StyleBuilder sb = new StyleBuilder(); // Line symbolizer stroke Stroke stroke =

Re: [Geotools-gt2-users] Programmatically retrieving a feature property name

2009-03-05 Thread Michael Bedward
You better watch out Ben... soon all of the really tricky styling questions are going to be directed to you :-) Michael -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the