Hello Michael !
Thanks for your guidance !
Actually what I want is, just the implementation of same functionality as
StyleFunctionLab in version 8.0 . . .
Currently I am doing something like following :
FeatureSource featureSource = someLayer.getFeatureSource();
SimpleFeatureCollection collection = (SimpleFeatureCollection)
featureSource.getFeatures();
SimpleFeatureSource source = DataUtilities.source(collection);
SimpleFeatureIterator iter = (SimpleFeatureIterator)
featureSource.getFeatures().features();
while (iter.hasNext()) {
SimpleFeature feature = iter.next();
//do something to change the style of this feature..
}
But I felt following problems :
1. It's not optimal at all.
2. I don't know how to change the style of that feature from the feature object
!!
so, I found the StyleFunctionLab for 2.6.3 very useful guide.
Can I implement the same functionality in 8.0 ??
thanks again !
________________________________
Best regards,Rakshit Majithiya
Techno geek, Web Developer,Code Lover
email : [email protected]
blog : http://thetechtime.com
skype : rakshit.majithiya
________________________________
From: Michael Bedward <[email protected]>
To: Rakshit Majithiya <[email protected]>
Cc: Jody Garnett <[email protected]>;
"[email protected]"
<[email protected]>
Sent: Thursday, 16 February 2012 8:34 AM
Subject: Re: [Geotools-gt2-users] Style Function Lab not working !
Here is an example, using a SLD document, where polygon fill colour is
based on a numeric feature attribute...
http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/polygons.html#attribute-based-polygon
You can do the same thing programatically as well. See the Map Style
tutorial for an introduction to programmatic vs SLD doc styling.
For more flexibility, you can combine a SLD doc with the "env"
function which allows for parameter substitution. This is explained
with an example here:
http://docs.geoserver.org/stable/en/user/styling/sld-extensions/substitution.html
In GeoTools the env function is implemented with this class:
http://docs.geotools.org/latest/javadocs/org/geotools/filter/function/EnvFunction.html
Hope that helps.
Michael
On 16 February 2012 11:42, Rakshit Majithiya <[email protected]> wrote:
> Hi !
> Thanks !
> Actually my goal is to implement the coloring different polygons according
> to their features..
>
> I couldn't find this tutorial in the new version. Where can I find the
> definition of UniqueColor function ?
> I am sorry, I am not very much familiar with this API..
>
> waiting to
hear for more light.
> ________________________________
> Best regards,
> Rakshit Majithiya
> Techno geek, Web Developer,Code Lover
> email : [email protected]
> blog : http://thetechtime.com
> skype : rakshit.majithiya
>
> ________________________________
> From: Jody Garnett <[email protected]>
> To: Rakshit Majithiya <[email protected]>
> Cc: [email protected]
> Sent: Thursday, 16 February 2012
1:16 AM
> Subject: Re: [Geotools-gt2-users] Style Function Lab not working !
>
> I thought UniqueColor function was a really hacky way to get a result used
> in the earlier tutorial. The new style function lab did a much better job of
> just updating the filter used (in a new layer used to draw the selection).
>
> Have a look at the tutorial again; it is much changed as the gt-swing module
> has been cleaned up for version 8.0.
>
> --
> Jody Garnett
>
> On Wednesday, 15 February 2012 at 4:54 PM, Rakshit Majithiya wrote:
>
>
> hello all !
> I'm new to geotools. . .
>
> I think this issue may be well known issue. . But we're really looking for
> the solution seriously . .
>
> When we try to run the stylefunctionlab example provided with api, it can't
> find the function named UniqueColor.
> And it throws a lot of
exceptions. .
> It only works in api with version 2.6.3 but we want to use this function in
> version 8.0. .
> Is there any way to do so ??
>
> It's very much urgently required to get this working. . .
>
> Thanks,
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> GeoTools-GT2-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
>
>
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> GeoTools-GT2-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users