Opened 14 years ago

Last modified 14 years ago

#3357 new enhancement

sortby feature in a GetFeature request is not yet implemented

Reported by: nsavard Owned by: mapserverbugs
Priority: normal Milestone:
Component: WFS Server Version: svn-trunk (development)
Severity: normal Keywords: wfs1.1 getfeature sortby
Cc: assefa, tomkralidis

Description

The sortby feature has to be implemented in the GetFeature request. Sorting has to be done in ascending or descending order.

See table 9a of OGC 04-094:

The SORTBY parameter is used to specify a list of property names whose values
should be used to order (upon presentation) the set of feature instances that satify the
query. The value of the SORTBY parameter shall have the form “PropertyName [A|D][,PropertyName
[A|D],...]” where the letter A is used to indicate an ascending sort and the letter D
is used to indicate a descending sort. If neither A nor D are specified, the default
sort order shall be ascending. An example value might be: “SORTBY=Field1
D,Field2 D,Field3”. In this case the results are sorted by Field 1 descending,
Field2 descending and Field3 ascending.
http://gw.mapgears.com:8500/cgi-bin/mswfs110_ogc_cite?&service=WFS&version=1.1.0&request=GetFeature&typename=sf:PrimitiveGeoFeature&sortby=sf%3AintProperty&namespace=xmlns(sf=http://cite.opengeospatial.org/gmlsf)

Change History (1)

comment:1 by tomkralidis, 14 years ago

Notes:

  • Filter 1.1.0 does not have advertising capabilities for SortBy. That is, supporting Filter 1.1.0 in WFS 1.1.0 implicitly requires SortBy support. So we don't have to update FilterCapabilities XML.
  • Does the MapServer codebase have any query result sorting implemented? If yes, then it's a case of parsing ogc:SortBy and passing to the query results. If no, then we need to discuss further
  • Filter 1.1.0 allows for sorting on multiple properties per table 9a
Note: See TracTickets for help on using tickets.