[QGIS-Developer] WFS vs WMS data types

Richard Duivenvoorde rdmailings at duif.net
Fri Dec 29 03:52:53 PST 2017


Hi Dev's,

(talking about 2.18 here)

WFS and WMS of the same service seem to create different attribute
data-types?

Going to this WFS:

https://geodata.nationaalgeoregister.nl/bag/ows?

there is a layer with 'panden' (houses), which have a column
'identification' which is (should be) a long integer (up to about 15
positions long).

On a WMS GetFeatureInfo request (same url) you will see those id's as
nice long integers/strings:
1598100000022426

BUT if you request the same house in a WFS layer, you will see floats:
1.59810000002243e+15
for example in the attribute table, or if you use the info-tool.

This is a problem if you need that id to create joints/relations.

I had a look into the sqlite file which is created in:
~/.qgis2/cache/wfsprovider/pid_16544
and indeed see this create table sql:

CREATE TABLE 'features' ( "__ogc_fid" INTEGER PRIMARY KEY AUTOINCREMENT,
'identificatie' FLOAT, 'bouwjaar' FLOAT, 'status' VARCHAR(255),
'gebruiksdoel' VARCHAR(255), 'oppervlakte_min' FLOAT, 'oppervlakte_max'
FLOAT, 'aantal_verblijfsobjecten' BIGINT, 'actualiteitsdatum' BIGINT,
'__qgis_gen_counter' INTEGER, '__qgis_gmlid' VARCHAR(255),
'__qgis_hexwkb_geom' VARCHAR(255), "__spatialite_geometry" POLYGON)

Is this a fixable (hopefully 2.18 only) problem?
As 2.18 will be LTR for some time.

Happy to create an issue for this. I also attache a 2.18 project file
which has these 2 layers zoomed in on a place with those long ids.

Regards,

Richard Duivenvoorde
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wfsdatatypes.qgs
Type: application/x-qgis
Size: 13090 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20171229/06bab910/attachment.qgs>


More information about the QGIS-Developer mailing list