I'm currently working in a MySQL database version 5.7. I've a polygon table that was created using the following way:
CREATE TABLE coords(
ref_geo CHAR(80) NOT NULL,
geom GEOMETRY NOT NULL
);
I was inserting polygons using the following structure:
INSERT INTO coords(ref_geo, geom ) VALUES( 'XX_01', ST_GEOMFROMTEXT( WKT ) );
*where WKT received the Well-known text without setting the SRID. However all coordinates were in EPSG:4326 (WGS84).
I can plot those fine in my WebMap application:
I want to do some visualization in QGIS, but I'm having a harding time doing it. What I did was to create a connection to MySQL Database and then I went to Layer | Add Layer | Add Vector Layer in QGIS. So QGIS can add the geometry table to Layers panel and it recognizes that is a polygon layer
but it doesn't show any feature. I even use the
Set SRID
option QGIS provides to ensure the data was interpreted in EPSG:4326, and then "Zoom to Layer", but still, the shapes are not being displayed by QGIS.
Funny and important fact: When I select one feature and click to zoom to it. The QGIS layout zooms to the right place (without showing the feature itself) :
Therefore, anyone has any hint in how can I make QGIS to display my geometry table data?
EDIT: Here is a subset of my WKT.
ST_GEOMFROMTEXT( WKT, 4326 )
instead ofST_GEOMFROMTEXT( WKT )
? Not sure if it will change something but worth a try?! Also as your geometry are polygon, turning the wrong side (also called winding) may be your issue cause. Can you give us one WKT sample by editing your question?