Hi list,
I’m trying to sort the results of a wfs query.
The wfs 1.1.0 standard allow to define some order rules, but it seems that geoserver isn’t aware of that.
This is my query:
<?xml version="1.0"?>
<wfs:GetFeature service=“WFS” version=“1.1.0” outputFormat=“GML2” xmlns:wfs=“http://www.opengis.net/wfs” xmlns:ogc=“http://www.opengis.net/ogc”>
<wfs:Query typeName=“arcstra”>
ogc:SortBy
ogc:SortProperty
ogc:PropertyNameASTA</ogc
:PropertyName>
ogc:SortOrderASC</ogc:SortOrder>
</ogc:SortProperty>
</ogc:SortBy>
ogc:Filter
<ogc:PropertyIsLike wildCard=“*” singleChar=“.” escapeChar=“!”>
ogc:PropertyNameNOMEVIA</ogc:PropertyName>
ogc:LiteralCORSO</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
But I can’t get the wfs to sort the gml:featureMember by the ASTA field of the layer.
Am I missing something, or just geoserver doesn’t implement sort in the wfs?
Thank you.
Gianni Barrotta ha scritto:
Hi list,
I'm trying to sort the results of a wfs query.
The wfs 1.1.0 standard allow to define some order rules, but it seems that geoserver isn't aware of that.
This is my query:
<?xml version="1.0"?>
<wfs:GetFeature service="WFS" version="1.1.0" outputFormat="GML2" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc">
<wfs:Query typeName="arcstra">
<ogc:SortBy>
<ogc:SortProperty>
<ogc:PropertyName>ASTA</ogc
:PropertyName>
<ogc:SortOrder>ASC</ogc:SortOrder>
</ogc:SortProperty>
</ogc:SortBy>
<ogc:Filter>
<ogc:PropertyIsLike wildCard="*" singleChar="." escapeChar="!">
<ogc:PropertyName>NOMEVIA</ogc:PropertyName>
<ogc:Literal>*CORSO*</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
But I can't get the wfs to sort the gml:featureMember by the ASTA field of the layer.
Am I missing something, or just geoserver doesn't implement sort in the wfs?
Hum, what datastore are you using?
We do implement sorting, but afaik only on jdbc based datastores (Postgis, Oracle and the like), whilst other datastores haven't been upgraded to support it.
I was doing a quick check with a shapefile and in fact sorting is ignored there... thinking about implementing sorting in shapefiles is
scary too, since we'd have to perform it in memory after loading all the data returned by the query (on a large shapefile that might kill GeoServer).
Justin should know more thought, I wasn't involved in the WFS 1.1 implementation. cc'ing him
Cheers
Andrea
Yes, I’m using a shape file…I’m very sad for this.
Eventually, I need to import the shape file in a Oracle Spatial layer.
Are there any other solution?
On Wed, Mar 19, 2008 at 2:46 PM, Andrea Aime <aaime@anonymised.com> wrote:
Gianni Barrotta ha scritto:
Hi list,
I’m trying to sort the results of a wfs query.
The wfs 1.1.0 standard allow to define some order rules, but it seems
that geoserver isn’t aware of that.
This is my query:
<?xml version="1.0"?>
<wfs:GetFeature service=“WFS” version=“1.1.0” outputFormat=“GML2”
xmlns:wfs=“http://www.opengis.net/wfs”
xmlns:ogc=“http://www.opengis.net/ogc”>
<wfs:Query typeName=“arcstra”>
ogc:SortBy
ogc:SortProperty
ogc:PropertyNameASTA</ogc
:PropertyName>
ogc:SortOrderASC</ogc:SortOrder>
</ogc:SortProperty>
</ogc:SortBy>
ogc:Filter
<ogc:PropertyIsLike wildCard=“*” singleChar=“.”
escapeChar=“!”>
ogc:PropertyNameNOMEVIA</ogc:PropertyName>
ogc:LiteralCORSO</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
But I can’t get the wfs to sort the gml:featureMember by the ASTA field
of the layer.
Am I missing something, or just geoserver doesn’t implement sort in the wfs?
Hum, what datastore are you using?
We do implement sorting, but afaik only on jdbc based datastores
(Postgis, Oracle and the like), whilst other datastores haven’t been
upgraded to support it.
I was doing a quick check with a shapefile and in fact sorting is
ignored there… thinking about implementing sorting in shapefiles is
scary too, since we’d have to perform it in memory after loading all the
data returned by the query (on a large shapefile that might kill GeoServer).
Justin should know more thought, I wasn’t involved in the WFS 1.1
implementation. cc’ing him
Cheers
Andrea
Gianni Barrotta ha scritto:
Yes, I'm using a shape file...I'm very sad for this.
Eventually, I need to import the shape file in a Oracle Spatial layer.
Are there any other solution?
For sorting with the shapefile? The usual one: provide a patch 
File based data stores are not well suited to filtering either given the lack of indexes on attributes, so WFS wise they are usually the last one
to receive a fix.
Cheers
Andrea
Hum, what datastore are you using?
We do implement sorting, but afaik only on jdbc based datastores (Postgis, Oracle and the like), whilst other datastores haven't been upgraded to support it.
I was doing a quick check with a shapefile and in fact sorting is ignored there... thinking about implementing sorting in shapefiles is
scary too, since we'd have to perform it in memory after loading all the data returned by the query (on a large shapefile that might kill GeoServer).
Justin should know more thought, I wasn't involved in the WFS 1.1 implementation. cc'ing him
Correct, and I have not even tested it for Oracle, so it may be just be supported in PostGIS.
Cheers
Andrea
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
!DSPAM:4007,47e1193359148992556831!