Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

getFeature-Plugin: sorting of numbers #1041

Open
eleu opened this issue Nov 6, 2015 · 1 comment
Open

getFeature-Plugin: sorting of numbers #1041

eleu opened this issue Nov 6, 2015 · 1 comment
Labels

Comments

@eleu
Copy link
Member

eleu commented Nov 6, 2015

We have a layer called "MIV-Zählstelle" with an attribute "Anzahl Fahrstreifen". This attribute only contains numbers and is also stored as a number in the database. If I do a getFeature-request over a couple of them and sort "Anzahl Fahrstreifen", it is not recogniced as sorting numbers.

getfeature
Instead of 0,1,2,4,6,7,10 it is 0,1,10,2,4,6,7.

We also tried with "gml_type" "auto", but it did not work. What can we do?

see https://github.com/camptocamp/baselstadt_mapbs/issues/67

@asaunier
Copy link
Member

That's most likely because all columns in the featuresgrid are typed as "string":
https://github.com/camptocamp/cgxp/blob/1.6/core/src/script/CGXP/plugins/FeaturesGrid.js#L765

Anyway not sure the WFS GetFeature responses provide types for the returned attributes.
Maybe if the layer metadata gml_types is set to auto as recommended in http://docs.camptocamp.net/c2cgeoportal/1.6/administrator/mapfile.html#wfs-getfeature
but on the other hand the mapserver documentation says that:

gml_types
(Optional) If this field is “auto” then some input feature drivers (ie. OGR, POSTGIS, ORACLESPATIAL and native shapefiles) will automatically populate the type, width and precision metadata for the layer based on the source file. Currently this is only used for OGR based output formats, not the WFS GML2/GML3 output.

http://mapserver.org/fr/ogc/wfs_server.html

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants