Hello,

Is it possible to use parameters in SLD instead of fixed values?
For example my filters are defined in following way:
<Filter>
    <PropertyIsEqualTo>
        <PropertyName>StatID</PropertyName>
        <Literal>2</Literal>
    </PropertyIsEqualTo>
</Filter>
...
<Filter>
    <PropertyIsEqualTo>
        <PropertyName>StatID</PropertyName>
        <Literal>3</Literal>
    </PropertyIsEqualTo>
</Filter>

I would like to use variables defined for example in some java class and to
use them 
instead fixed values (2, 3, and so on) like:

<Filter>
    <PropertyIsEqualTo>
        <PropertyName>StatID</PropertyName>
        <Literal>some predefined parameter</Literal>
    </PropertyIsEqualTo>
</Filter>
...
<Filter>
    <PropertyIsEqualTo>
        <PropertyName>StatID</PropertyName>
        <Literal>some predefined parameter</Literal>
    </PropertyIsEqualTo>
</Filter>


In that way i could change their values in future only in that class and not
in whole (large) SLD.

Best regards.





iceDice wrote:
> 
> Thank you guys, version with view in the database is working fine.
> 
> 
> Miles Jordan wrote:
>> 
>> iceDice wrote:
>>>
>>> Hello,
>>>
>>> I am interested is it possible to filter GIS data in SLD depending on
>>> some non-GIS data stored in other table in database? Is it possible to
>>> refer to some column in other table when specifying filter in SLD?
>>> For example, is it possible for number (in example below) to be some
>>> column in other table, but not in GIS table from which i load map data
>>> in data store. I have some information which i need to use when
>>> display features but stored in another table and what is the best way
>>> how to use it. I want to escape any data duplication.
>>>
>>> <FeatureTypeStyle>
>>>     <Rule>
>>>         <Filter>
>>>             <PropertyIsEqualTo>
>>>                 <PropertyName>number</PropertyName>
>>>                 <Literal>35</Literal>
>>>             </PropertyIsEqualTo>
>>>         </Filter>
>>>     ...
>>> Best regards.
>>>
>> 
>> The simplest way would probably be to create a view in the database that
>> contains all of the values from all of the tables that you require. Then
>> you can access it as you would any normal table.
>> 
>> Regards,
>> 
>> Miles
>> 
>> 
>> ___________________________________________________________________________
>> 
>>     Australian Antarctic Division - Commonwealth of Australia
>> IMPORTANT: This transmission is intended for the addressee only. If you
>> are not the
>> intended recipient, you are notified that use or dissemination of this
>> communication is
>> strictly prohibited by Commonwealth law. If you have received this
>> transmission in error,
>> please notify the sender immediately by e-mail or by telephoning +61 3
>> 6232 3209 and
>> DELETE the message.
>>         Visit our web site at http://www.antarctica.gov.au/
>> ___________________________________________________________________________
>> ------------------------------------------------------------------------------
>> Join us December 9, 2009 for the Red Hat Virtual Experience,
>> a free event focused on virtualization and cloud computing. 
>> Attend in-depth sessions from your desk. Your couch. Anywhere.
>> http://p.sf.net/sfu/redhat-sfdev2dev
>> _______________________________________________
>> Geotools-gt2-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>> 
>> 
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/GeoTools-SLD-issue-tp4093720p4104896.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to