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 am a newbie to GIS systems so please be patient.

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.

Any suggestions or pointers on what might be the problem?

share|improve this question

closed as off-topic by underdark Jun 4 at 12:01

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – underdark
If this question can be reworded to fit the rules in the help center, please edit the question.

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? –  BradHards Mar 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. –  djq Mar 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. –  user16467 Mar 24 '13 at 14:28
@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 Spatial Mar 25 '13 at 6:18

Browse other questions tagged or ask your own question.