[Geoserver-users] Collection_Unique function

Can anyone provide an example of the Collection_Unique function? I was
hoping to use it in a filter for a WFS request to return only unique values.
I'd like to do something like this:
    <wfs:Query typeName="massgis:GISDATA.OPENSPACE_POLY">
        <ogc:PropertyName>SITE_NAME</ogc:PropertyName>
            <ogc:Filter>
                       <ogc:PropertyIsEqualTo>
                        <ogc:PropertyName>OWNER_ABRV</ogc:PropertyName>
                                    <ogc:Literal>DFG</ogc:Literal>
                        </ogc:PropertyIsEqualTo>
                        <ogc:Function name="Collection_Unique">
                                   
<ogc:PropertyName>SITE_NAME</ogc:PropertyName>
                        </ogc:Function>
            </ogc:Filter>
    </wfs:Query>

A prior
http://www.nabble.com/WFS-Distinct-Query-Request-td12071839.html#a12071839
post indicates that this is not possible but that leaves me wondering about
the utility of the Collection_Unique function.

Thanks,
Dan

-----
Dan Koch
Massachusetts Dept. of Fish & Game
--
View this message in context: http://www.nabble.com/Collection_Unique-function-tp16628237p16628237.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Dan,

Unfortunately the wfs spec does not really support applying functions to overall feature collections in this way. To do that WPS (Web Processing Service) is more applicable.

The only thing functions give you is a flexible way of applying filtering criteria. Perhaps someone can think of a way to use them to achieve your goal of unique values... i cant really think of one off the top of my head.

-Justin

Dan Koch wrote:

Can anyone provide an example of the Collection_Unique function? I was
hoping to use it in a filter for a WFS request to return only unique values. I'd like to do something like this:
    <wfs:Query typeName="massgis:GISDATA.OPENSPACE_POLY">
        <ogc:PropertyName>SITE_NAME</ogc:PropertyName> <ogc:Filter>
                       <ogc:PropertyIsEqualTo>
                        <ogc:PropertyName>OWNER_ABRV</ogc:PropertyName>
                                    <ogc:Literal>DFG</ogc:Literal>
                        </ogc:PropertyIsEqualTo>
                        <ogc:Function name="Collection_Unique">
                                   <ogc:PropertyName>SITE_NAME</ogc:PropertyName>
                        </ogc:Function>
            </ogc:Filter>
    </wfs:Query>

A prior http://www.nabble.com/WFS-Distinct-Query-Request-td12071839.html#a12071839
post indicates that this is not possible but that leaves me wondering about
the utility of the Collection_Unique function.

Thanks,
Dan

-----
Dan Koch
Massachusetts Dept. of Fish & Game

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com