[mapserver-users] WFS: How to sort the WFS output in MS 5.x.x ?
Schönhammer, Herbert
Schoenhammer.Herbert at Regensburg.de
Wed Dec 10 04:53:12 PST 2008
Hi list,
until now I've been using mapserver 4.10.2 for generating wfs (for use with wfs-gazetteers). I determined the order of the wfs-output with the ORDER BY clause of the DATA-statement.
Example:
DATA 'the_geom from (SELECT the_geom, fid, str_name, haus_nr, haus_nr_zusatz, str_such_string, ... FROM stgk_hausnummern ORDER BY str_name,haus_nr,haus_nr_zusatz) as foo using unique fid using SRID=31468'
The result:
Changing the ORDER BY - clause caused changing the sort order of the output.
==============================================================
Using mapserver 5.2.0 and mapserver 5.2.1 the ORDER BY - clause has obviously no effect. The wfs - output is always sorted by sort order given from attribute fid.
Fid is the feature-id and implemented in the database as a unique-constraint.
Is it possible to change the sort order in mapserver 5.x.x too?
Has anybody a tipp for me, how this could be done ?
Thanks
Schoenhammer Herbert
P.S.
The generated urls are looking like:
http://myserver/cgi-bin/getows?map=/data-umn/wfs/rgb_wfs_adressen.map&REQUEST=getFeature&Typename=adressen&Version=1.0.0&service=WFS&filter=%3Cogc:Filter+xmlns:ogc=%27http://ogc.org%27+xmlns:gml=%27http://www.opengis.net/gml%27%3E%3Cogc:PropertyIsLike+wildCard=%27*%27+singleChar=%27.%27+escape=%27!%27%3E%3Cogc:PropertyName%3Estr_such_string%3C/ogc:PropertyName%3E%3Cogc:Literal%3E*MARTIN*%3C/ogc:Literal%3E%3C/ogc:PropertyIsLike%3E%3C/ogc:Filter%3E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20081210/b48680f8/attachment.htm>
More information about the MapServer-users
mailing list