0

enter image description here

Having some issues getting my SQL data to display correctly in my QGIS map layout. I am using Postgresql/Postgis, QGIS 2.4, Windows 7 (64bit OS). I created a database with some point data that is supposed to outline the values collected at a specific geographical location in Colorado, but when I load the data, it is displayed as 1 single point in the middle of the Atlantic off the coast of Africa. I will attach a screenshot of what I am seeing.

enter image description here

1 Answer 1

1

At first glance this appears to be a coordinate system issue - do the coordinate systems of your data (i.e. WGS84, State Plane, UTM, etc.) match the map space?

or possibly the x/y is reversed? but that prob wouldn't result in one point...

and if you're using the SQL "geography" data type keep in mind -

SQL Server uses the default SRID of 4326, which maps to the WGS 84 spatial reference system, when using methods on geography instances. If you use data from a spatial reference system other than WGS 84 (or SRID 4326), you will need to determine the specific SRID for your geography spatial data.

7
  • I suppose your points are really in degrees in range -90/+90 degrees N and -180/180 degrees E. In your map they are interpreted as meters around the Null Island en.wikipedia.org/wiki/Null_Island
    – user30184
    Sep 22, 2014 at 16:13
  • Hi Michael, Thanks for the comment, when I created the database I used the following command: SELECT AddGeometryColumn('public', 'beacon_point', 'rsrp0_gem', 3395, 'POINT', 2); this created the geometry column in my DB and I assigned 3395 as the SRID which is what I am using in my project. @user30184 I don't understand your comment, can you elaborate pls. Thanks
    – Rayray
    Sep 22, 2014 at 18:57
  • 1
    I mean that if system is using degrees as units like EPSG:4326 does, the coordinate range is between -90-+90 and -180-+180. If these coordinates are plotted without reprojecting them on top of map in EPSG:3857 like in your screen capture the whole world seems to fit inside a 180 by 360 meter sized box in the Atlantic ocean. This error is so common that the Null Island has been discovered. Are you sure that your data are in EPSG:3395 epsg.io/3395 is your projection? Could you show us the coordinates of some points?
    – user30184
    Sep 22, 2014 at 19:59
  • 1
    If you select projection EPSG:4326 and use -104.58 as longitude and 39.95 as latitude the point hits into Colorado. Notice that the values in columns x_lat and y_long are now in wrong order.
    – user30184
    Sep 23, 2014 at 11:34
  • 1
    Ok, so I think I have it working now but what I did to get it working doesn't make much sense to me so here goes. I set the map CRS to WGS 84 / Pseudo Mercator (EPSG:3857) and my database data layer in QGIS is set to WGS 84 (EPSG:4326) and now my data displays in the correct location. Any ideas why this setup would work? I had changed the database geometry column to EPSG:4326, trying to get everything to default but when I set the map to EPSG:4326 my data displays approximately 1 mile off from where it is supposed to. This is the only combination of settings that seems to work.
    – Rayray
    Sep 23, 2014 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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