<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Arial, sans-serif" size="2">
<div>Hi list,</div>
<div>&nbsp;</div>
<div>until now I've been<b> using mapserver 4.10.2 </b>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.</div>
<div>&nbsp;</div>
<div>Example:</div>
<div>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'</div>
<div>&nbsp;</div>
<div>The result:</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>Changing the ORDER BY - clause caused changing the sort order of the output.</div>
<div>&nbsp;</div>
<div>==============================================================</div>
<div>&nbsp;</div>
<div><b>Using mapserver 5.2.0 and mapserver 5.2.1 </b>the ORDER BY - clause has obviously no effect. The wfs - output is <b>always</b> sorted by sort order given from attribute <b>fid</b>. </div>
<div>Fid is the feature-id and implemented&nbsp; in the database as a unique-constraint. </div>
<div>&nbsp;</div>
<div>Is it possible to change the sort order in mapserver 5.x.x too?</div>
<div>Has anybody a tipp for me, how this could be done ?</div>
<div>&nbsp;</div>
<div>Thanks</div>
<div>&nbsp;</div>
<div>Schoenhammer Herbert</div>
<div>&nbsp;</div>
<div>P.S.</div>
<div>&nbsp;</div>
<div>The generated urls are looking like:</div>
<div><a href="http://myserver/cgi-bin/getows?map=/data-umn/wfs/rgb_wfs_adressen.map&amp;REQUEST=getFeature&amp;Typename=adressen&amp;Version=1.0.0&amp;service=WFS&amp;filter=%3Cogc:Filter&#43;xmlns:ogc=%27http://ogc.org%27&#43;xmlns:gml=%27http://www.opengis.net/gml%27%3E%3Cogc:PropertyIsLike&#43;wildCard=%27*%27&#43;singleChar=%27.%27&#43;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"><font color="#0000FF"><u>http://myserver/cgi-bin/getows?map=/data-umn/wfs/rgb_wfs_adressen.map&amp;REQUEST=getFeature&amp;Typename=adressen&amp;Version=1.0.0&amp;service=WFS&amp;filter=%3Cogc:Filter&#43;xmlns:ogc=%27http://ogc.org%27&#43;xmlns:gml=%27http://www.opengis.net/gml%27%3E%3Cogc:PropertyIsLike&#43;wildCard=%27*%27&#43;singleChar=%27.%27&#43;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</u></font></a></div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
</font>
</body>
</html>