I have a point-layer i Postgis v12 which is ST_point, ST_NDims = 3.
When creating a new point i QGIS and then tries to save it, I get an error:
Column has Z dimension but geometry does not
When looking in to the object identifier the derived attributes only contains X and Y. However, the rest of the points that loads from the database has a Z-value set to 0 attached to them. So i get that my created point dosen´t have a Z-value.
Isn't it possible to create new data in 3 dimensional tables from Postgis in QGIS? Even with a deafult value of 0, I don´t even need to specify the Z-value at this moment.
EDIT
If I save the layer in a QGIS-project and open the .qgs-file and look into the datasource-tag for the the layer I have:
type=Point
When changing this to:
type=PointZ
saves the project and try to create a new object, it works fine.
I then go on to Postigs to run the following alter to the table:
ALTER TABLE cl ALTER COLUMN geom TYPE geometry(PointZ) USING ST_Force3D(geom);
However, when checking the geometry type again it still remain ST_POINT... Also when trying to create a new point after the "ALTER" of the table, type=Point in the .qgs-file.
How come that I can create a new feature when I change the type to "type=pointZ" in the project? Even if the table is in 3D I can create and store features. And why can't QGIS read this geometry from Postgis without have to set i manually in a project? As suggested below, I get the correct typ from the query: ST_AsText Seems to me that QGIS reads ST_GeometryType istead of ST_AsText, or?