[mapserver-dev] incorrect layer drawing order issue

geographika geographika at gmail.com
Sun Nov 9 11:49:26 PST 2014


Would a SORTBY clause be added as a keyword in the DATA statement?
E.g. DATA "ogr_geometry from rivers USING UNIQUE ogr_fid USING SRID=4326 
USING SORTBY my_sort_fieldname"

On 07/11/2014 12:49, Tamas Szekeres wrote:
> We could also extend the DATA section with a SORTBY clause for the 
> mssql driver.
> Adding this feature to MSSQL (as per RFC 105) would anyway be fairly easy.
>
> Tamas
>
>
>
>
> 2014-11-07 11:24 GMT+01:00 geographika <geographika at gmail.com 
> <mailto:geographika at gmail.com>>:
>
>     Hi list,
>
>     I have come across an issue that is critical to the project I am
>     working on and wondered if it applies to all database drivers or
>     just the SQL Server 2008 one.
>
>     I have logged the issue on GitHub at:
>     https://github.com/mapserver/mapserver/issues/5008
>
>     I will try some tests over the weekend to see if the Postgres
>     driver works the same way, but there seems to be no way of
>     guaranteeing feature display order - even if all documentation
>     suggests it can be achieved in a database layer using "ORDER BY"
>     Whilst for a low number of records the order seems ordered, with
>     150+ features I get different images returned each time by my WMS
>     service. No use of clustered indexes, partition statements etc.
>     can get around this as SQL result sets can only be guaranteed with
>     an ORDER BY in the outermost statement.
>
>     I note that in
>     http://mapserver.org/fr/development/rfc/ms-rfc-105.html there is a
>     new function msLayerBuildSQLOrderBy() that allows sorting to be
>     done outside of the layer's DATA statement for WFS requests with a
>     SORTBY parameter. Maybe this could also be used by a new LAYER
>     "SORT" config keyword?
>
>     I see the above is only implemented for a few drivers. The client
>     would be willing to fund adding this to the SQL Server driver if
>     there are any core devs interested in doing this.
>
>     Regards,
>
>     Seth
>
>     --
>     web:http://geographika.co.uk
>     twitter: @geographika
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20141109/002be557/attachment.html>


More information about the mapserver-dev mailing list