I made a polygon in a SpatiaLite 4 database as follows:
INSERT INTO test_pg (id, name, geom) VALUES (3, 'test', ST_PolyFromText('POLYGON((8.556824 47.185269, 8.611009 47.185269, 8.611009 47.218568, 8.556824 47.218568, 8.556824 47.185269))', 4326));
I assume that the order of coordinates is always LON LAT - is that correct?
When I do
SELECT ST_AsText(geom) FROM test_pg it correctly outputs the polygon coordinates.
Now in QGIS, I add the SpatiaLite layer but the polygon does not get displayed (even after clicking on this zoom to layer thing). Geometry seems to be valid, I checked it with the QGIS tool. I also found out that when moving the cursor on the map in the east direction, 47.xxx (LAT in this case) gets increased, when moving the cursor in the north direction, 8.xxx gets increased. This should be reversed, shouldn't it?
Where are my errors?
EDIT: I also INSERTED a polygon with LON LAT coordinates reversed. This polygon actually gets displayed in QGIS, but again, 47.xxx is displayed as LON and 8.xxx as LAT where it should be the opposite actually.
EDIT2: Consider this question as closed. For some reasons, it suddenly works. Don't ask me why, maybe restarting QGIS several times helped...