Hello All,
Does anybody know of where I can find examples of how to write the xml for
using the functions within the filters for WFS? I've been able to use the
spatial operator and comparison operator filters, but I just don't know how
to approach using the functions.....I see the functions that are listed in
the GetGapabilities xml that list the number of arguments, I've looked at
the filter spec (argh!) and I've looked at the fliter classes in GeoTools,
but I just can't figure out how to use the functions in Geoserver. I'm not
really looking for a specific function: I just want to "see what's
possible."
If somebody could just provide me a sample or two, I could probably begin to
figure out how to use most of them. And I'd be very willing to begin some
documentation for other users.
Thanks again,
Steve
Stephen Crawford
Center for Environmental Informatics
GeoVISTA Center
The Pennsylvania State University
814.865.9905
src176@anonymised.com
Hi Stephen,
You should be able to place an "ogc:Function" element anywhere another
expression would go. The element has an attribute called "name" and then
takes a set of arguments as children:
Examples:
<wfs:Query typeName="states">
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:Function name="strStartsWith">
<ogc:PropertyName>STATE_NAME</ogc:PropertyName>
<ogc:Literal>CALI</ogc:Literal>
</ogc:Function>
<ogc:Literal>true</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</wfs:Query>
<wfs:Query typeName="states">
<ogc:Filter>
<ogc:PropertyIsGreaterThan>
<ogc:Function name="max">
<ogc:PropertyName>MALE_POPULATION</ogc:PropertyName>
<ogc:PropertyName>FEMALE_POPULATION</ogc:Property>
</ogc:Function>
<ogc:Literal>10000</ogc:Literal>
</ogc:PropertyIsGreaterThan>
</ogc:Filter>
</wfs:Query>
Hope that helps.
-Justin
Stephen Crawford wrote:
Hello All,
Does anybody know of where I can find examples of how to write the xml for
using the functions within the filters for WFS? I've been able to use the
spatial operator and comparison operator filters, but I just don't know how
to approach using the functions.....I see the functions that are listed in
the GetGapabilities xml that list the number of arguments, I've looked at
the filter spec (argh!) and I've looked at the fliter classes in GeoTools,
but I just can't figure out how to use the functions in Geoserver. I'm not
really looking for a specific function: I just want to "see what's
possible."
If somebody could just provide me a sample or two, I could probably begin to
figure out how to use most of them. And I'd be very willing to begin some
documentation for other users.
Thanks again,
Steve
Stephen Crawford
Center for Environmental Informatics
GeoVISTA Center
The Pennsylvania State University
814.865.9905
src176@anonymised.com
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
!DSPAM:1004,45a80f4043401702038478!
--
Justin Deoliveira
jdeolive@anonymised.com
The Open Planning Project
http://topp.openplans.org