[mapserver-users] DATA "table" does not find FID for WFS

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Wed Oct 28 00:10:44 PDT 2015


Hi,

I have noticed with Mapserver 7.0 that WFS server does not find the "gml_featureid" column if I define DATA this way:

CONNECTIONTYPE OGR
CONNECTION "\ms4w\apps\wms-wfs.sqlite"
DATA "states"

This gives a warning into GML sent by GetFeature
<!-- WARNING: FeatureId item 'PK_UID' not found in typename 'states_table'.
-->
and featureMembers are without fid
<gml:featureMember>
<ms:states_table>

This leads to correct result:

CONNECTIONTYPE OGR
CONNECTION "\ms4w\apps\wms-wfs.sqlite"
DATA "select * from states"

<gml:featureMember>
<ms:states_table fid="states_table.1">

Documentation http://www.mapserver.org/input/vector/ogr.html does not warn that defining data as "layer_name" vs. "select * from layer" could make a difference. Ogrinfo finds the FID column and reports it as:
FID Column = PK_UID

PK_UID is defined in the table as
CREATE TABLE states (
PK_UID INTEGER PRIMARY KEY AUTOINCREMENT,


This looks like a bug but I am not sure if it is a Mapserver bug of GDAL bug and if it affects only Spatialite.

-Jukka Rahkonen-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20151028/b7680514/attachment.html>


More information about the mapserver-users mailing list