When exporting your model with 3D shapes, you might notice that you only see 2D coordinates in the generated GML file.

In GML, geometry dimensions are tied to the model reference. More specifically, the GML encoder looks at the axes of your model’s ILcdModelReference to determine which dimensions need to be encoded.

Hence, to encode 3D information, make sure that your model has a suitable 3D model reference. As an example, for WGS 84 geometry with heights above the ellipsoid, you can create a 3D reference using this:

Program: Creating a 3D WGS 84 reference
new TLcdEPSGReferenceParser().parseModelReference("EPSG:4979");