I have a dataset (from mysql
) which I can load into QGIS. One of the columns in the table (and thus in the attribute table) is a WKT
column. I am not able to select this column for the geometry.
The WKT
looks like this: LINESTRING Z (101438.727 426681.927 -0.555, 101428.442 426687.427 -0.539)
. What I would like to do is to tell the vector layer to show all line strings based on the WKT in the attribute table.
All I can find was how to get geometries inside the attribute table, but I would like to do it the other way around.
I tried to create a geometry column, but that returns only NULL in my attribute table (and I still don't know how to tell QGIS to look in the attribute table of a geometry object)
What I use:
geom_from_wkt( "WKT" )
example below shows <geometrie: LineStringZ>
but the attribute table shows NULL
.
EDIT
I have a mysql
table containing multiple columns and one of them is a WKT column. When I load the table using layer - add layer - vector layer
I choose Database
and create my connection.
At the moment a new layer is created with my whole mysql table as attribute table, and the layer has no geometry.
I would like to "tell" QGIS that the information regarding the geometry is inside the attribute table, in the column WKT
(that is also the name of the column). What I would like to do is to display my spatial information (from mysql) inside QGIS.
The reason I am using text instead of mysql geometries is because the mysql geometries do not support 3D information (like LINESTRING Z
).