I have a spatial table called 'places' in MySQL, with a spatial column 'pt' (point). I tried to import it in QGIS and no points appear. I created a view 'places_as_text' which reproduces the table but shows the points as WKT (used astext(pt) in the definition of the view). Still nothing appears in QGIS.
Any help appreciated
-
How did you try to add the spatial table? Like described in getspatial.com/gisblog/qgis-vector-data-connection?underdark– underdark2011年09月10日 16:31:42 +00:00Commented Sep 10, 2011 at 16:31
-
Yes, and I also tried through python as explained here: qgis.org/pyqgis-cookbook/loadlayer.html the result is the same. My spatial column, astext, has values that look like that: 'POINT(249386 371818)'Vladtn– Vladtn2011年09月10日 17:29:38 +00:00Commented Sep 10, 2011 at 17:29
1 Answer 1
I'm using MySQL spatial tables everyday with QGIS in r&w mode using
Add Vector> Database> Type: MySQL
and defining a new connection, just like described in http://getspatial.com/gisblog/qgis-vector-data-connection. I can connect both to local and remote server. I'm not using the original geometry definition and not converting it to WKT. Do you have any connection problem (what is the result of test connection)?
Check also your table structure: field type MUST be GEOMETRY otherwise QGIS will load the table as attribute table and will not show any vector!
-
Thanks for the hint, I will try and update, but the data is not that easy to access at the momentVladtn– Vladtn2012年04月02日 12:55:25 +00:00Commented Apr 2, 2012 at 12:55
-
3It seems that this has been removed in QGIS 2.0 ...Julian Bogdani– Julian Bogdani2013年09月25日 09:27:21 +00:00Commented Sep 25, 2013 at 9:27