Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

share|improve this question
    
How did you try to add the spatial table? Like described in getspatial.com/gisblog/qgis-vector-data-connection? –  underdark Sep 10 '11 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 Sep 10 '11 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!

share|improve this answer
    
Thanks for the hint, I will try and update, but the data is not that easy to access at the moment –  Vladtn Apr 2 '12 at 12:55
    
It seems that this has been removed in QGIS 2.0 ... –  bradypus Sep 25 '13 at 9:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.