[mapserver-users] WFS element datatypes are all strings - how to set as integer?

Frank Warmerdam warmerdam at pobox.com
Tue Nov 23 11:09:23 EST 2010


pcreso at pcreso.com wrote:
> Hi,
> 
> I'm looking to use mapserver to provide WFS data layers to QGIS clients. 
> I need to display the layer using a data field to control symbology 
> (symbol size), but QGIS can only use an integer field for this.
> 
> As below, mapserver identifies all the elements as strings, which is a 
> problem. The data source is a Postgis table, the data statement 
> generates an integer field to use to scale the layer, but mapserver 
> seems to cast it as a string.
> 
> Is there any way to have mapserver specify a WFS integer element from a 
> Postgis layer?

Brent,

I think you want to se the gml_<fieldname>_type metadata item in the layer
to "integer".  You can read more detail on this in the WFS server document.
This should work in 5.6.

In MapServer trunk, as part of the OGR output overhaul, the ability was added
to put "gml_types" "auto" in the metadata in order to have the types derived
from the data source (for OGR, PostGIS, Oracle and shapefile input sources
for now).  The RFC on OGR output touches on this as well as the docs in
trunk.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list