QGIS/GeoServer WFS 3D geometry

13 views
Skip to first unread message

Mike Bundock

unread,
Nov 9, 2025, 2:56:30 PMNov 9
to QGIS Australia User Group
Hi.  If I add layers that are coming directly from PostGIS that are 3D (eg. with LinestringZ geometries), then querying  the features exposes their z values and I can capture and set the z values using the advanced digitizing panel.
However, if i add the same table as a published WFS layer (published via geoserver) it only appears as a 2D geometry and z values cannot be set or interrogated. 
It is possible that I need to force use of GML3 in geoserver somehow.
Does anyone know how to get 3D data published via WFS from geoserver?

any assistance gratefully received.

regards

Mike

Mike Bundock

unread,
Nov 10, 2025, 4:32:06 PMNov 10
to QGIS Australia User Group
As far as I can tell, geoserver is publishing the data correctly with 3D coordinates.  
Firstly the DescribeFeatureType request identifies that GML3.2 is being used and that the geometry field is of type curve:
       name="geom" nillable="true" type="gml:CurvePropertyType"

GML3.2 specifies that a CurvePropertyType can be one of the following:
  • AbstractCurve
  • LineString
  • Curve
  • OrientableCurve
  • CompositeCurve
And in the GetFeature request below we see that the geometry is indeed a LineString with dimension=3

The following is a test WFS GetFeature request response showing srsDimension="3" and the correct coordinates in the list.
<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:test="https://augview.net/test" xmlns:wfs="...">
</wfs:FeatureCollection>
<wfs:member>
<test:Conduit gml:id="Conduit.2">
<test:Id>2</test:Id>
<test:Diameter>100</test:Diameter>
<test:nominal_depth>0.7</test:nominal_depth>
<test:geom>
<gml:LineString srsName="urn:ogc:def:crs:EPSG::7856" srsDimension="3" gml:id="Conduit.2.geom">
<gml:posList>545065 6891857 1 545075 6891857 1.2 545079 6891865 1 545095 6891827 1.2</gml:posList>
</gml:LineString>
</test:geom>
</test:Conduit>
</wfs:member>
</wfs:FeatureCollection>


So I believe that GeoServer is publishing the data correctly but that when adding the layer to QGIS it is dropping the z values (although correctly interpreting the sequence of values).

Any & all help gratefully accepted
regards
Mike
Reply all
Reply to author
Forward
0 new messages