I have a PostGIS database set up with a spatial data table. One of the columns is of Geometry type and contains Points with SRID 4326. I want to view these points overlaid on a map. I can connect to PostGIS from QGIS, load the points as a PostGIS layer and using the OpenLayers plugin also overlay these on a map. The trouble is, it appears that the latitude and longitudes are reversed when displaying them in QGIS! When I connect to the database from command line and use the SELECT query with ST_ASTEXT on the geometry column, I can see that the lat longs are in correct order.

Welcome to gis.SE. Did you create the geometry entries yourself? Are you sure you entered them in the right order (which is longitude, then latitude - its an X-Y thing). If not, can you tell us more about the source of your spatial data?
–
BradHardsMar 24 '13 at 11:08

Are you certain that your lat/longs are correct? Latitude is the Y axis, longitude is the X axis (I've got these backwards multiple times). I suspect QGIS is fine, and your data is incorrect.
–
djqMar 24 '13 at 13:00

Thanks. I had actually created a Geography column (location) and populated it with data. However, I was having trouble loading this into QGIS. So I added a new Geometry column (locationgeom) and populated it with, UPDATE locations set locationgeom = location::geometry; Your comment made me look closely at the text format of Point and it appears that I had the lat longs the other way around POINT(Lat, Long) instead of POINT(Long, Lat). Fixing it now QGIS shows the points properly overlaid on the map.
–
user16467Mar 24 '13 at 14:28

1

@user16467 - Since it seems you have found a solution to your problem, you should add that to the site as an actual answer and then accept it. This would enable other people who may have the same problem to search and potentially find your answer as a guide. If it is simply stored in a comment like above, it will not show up in search results.
–
Get SpatialMar 25 '13 at 6:18