That is correct, the SLD parser reviews all the function parameters, and
only requests those that are used from the shapefile or database.
If you do not request it you do not get it.
Jody Garnett
On Thu, Jan 9, 2014 at 3:06 AM, rbl gcn <[email protected]> wrote:
> Hi all,
>
> I wrote a custom geotools Function class and I am using it for styling. I
> want to pass all properties of SimpleFeature to evaluate() method but it
> only gets geometry descriptor if I use like below:
>
> *ff.function("gs", ff.literal("javascript"), ff.literal(propname))*
>
>
> However, If I use "ff.property" with function call:
>
> *ff.function("gs", ff.literal("javascript"), ff.property(propname)) *
>
>
> It passes geometry descriptor and property with propname.
>
> At evaluate() method i need all properties names.
>
> * @Override*
> * public <T> T evaluate(Object object, Class<T> context) {*
> * .*
> * .*
> * .*
> * if(attributeList == null) {*
> * attributeList = new ArrayList<>();*
> * if (object instanceof SimpleFeature) {*
> * List<AttributeDescriptor> attList = ((SimpleFeature)
> object).getFeatureType().getAttributeDescriptors();*
> * for (AttributeDescriptor attributeDescriptor : attList) {*
> * attributeList.add(attributeDescriptor.getLocalName());*
> * }*
> * }*
> * }*
> * .*
> * . *
> * }*
>
> So, what should I do to get all properties?
>
> Thanks
> Cagri
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> GeoTools-GT2-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users