I am importing a simple 5 column csv file into QGIS using Add Delimited Text Layer. Each row of the table contains a name, a street address, a postcode, a decimal latitude and a decimal longitude, for example:

Harewood Road,"8a Harewood Road, Brentwood, Essex",CM15 9PD,51.635252,0.292283

In the add layer window (Data Source Manager), I get the file format and encoding recognised; under Geometry Definition, Point co-ordinates is automatically selected with X field linked to my longitude column and Y field as my latitude column.

DMS coordinates is not ticked.

Under Sample Data at the bottom, all looks as you would expect.

Once the layer is added, dots are displayed in QGIS on the map in a scatter as I would expect (my csv contains several point locations). But the scale is completely wrong. If I right-click on my layer and select Zoom to layer I find my dots are all in the middle of the sea (actually, off the Isles of Scilly in the far south-west corner of the UK National Grid).

At the bottom of my QGIS window there is a little widget showing Co-ordinate that shows appropriate-looking numbers e.g. 0.292283,51.635252, (lon,lat), but the Scale widget is showing 1:3! So these places are being mapped as if they cover the area of a post-it note.

Edit: looks like a duplicate of Mysterious Lat Long conversion to XY problem using QGIS ... the solution there was to use a different CRS. I'm currently using EPSG:27700 (British National Grid) for all my layers and basemap. So what should I project with instead?

If I then go to the layer properties and from the left menu select Attribute form, and then select the Latitude field, it shows the Widget type as Text Edit. If I change this to Range, the Minimum and Maximum fields are enormous numbers:

-/+ 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.00 

Under Advanced Options it tells me that: "Current minimum for this value is 51.608082 and current maximum is 51.834236" which matches the min and max of my dataset.

If I import a similar csv file as a delim text layer, but with Eastings and Northings included, and pass those columns as the X and Y co-ordinates, it imports the points perfectly. But for some reason QGIS is not correctly interpreting the valid lat and lon numbers I am giving it. I would like to know why.

  • look like a CRS issue, did you set the right CRS (last box in the Geometry definition section when you import the CSV) for your data ?, if not it look like it should be wgs 84 EPSG:4326 – J.R Apr 2 '19 at 16:35

Your map is not in lat lon but your data is. Since csv files do not carry any projection information with them they are assumed to be in the map projection. Right click on the layer and choose change the projection and select wgs84 (4326). Qgis will handle the reprojection for you.

  • Thank you that's really helpful. I don't really understand how the map cannot be in lat lon (it's from OpenStreetMap) but maybe I will find out or understand that one day! Anyway problem solved. – Francis Barton Apr 2 '19 at 16:38
  • please accept the answer if it solved your problem – Ian Turton Apr 3 '19 at 7:37
  • Have tried but it wasn't accepting my click on the tick. – Francis Barton Apr 3 '19 at 9:38

The answer in the referenced link above (Mysterious Lat Long conversion...) is correct, but doesn't clearly state what needs to be done: When importing XY data, set the Geometry CRS (of the data you're importing) to EPSG:4326 (WGS 84). My project (and default) CRSs are set to the standard for my locality; you just need to be sure to set the data import CRS to EPSG:4326. The data should come in looking correct, but you should (always) run Reproject layer to set the imported data to your desired projection.

I'd like to add that when importing data with UTM coordinates, you SHOULD set the Geometry CRS to your desired end CRS (at least that's how it worked for me; setting it to EPSG:4326 put the data out in the middle of nowhere).

(A side note: When I imported some data recently, I remembered WGS 84, but didn't remember the EPSG number, so I chose the wrong one. Save yourself time and document the number (and if you forget the number and search the CRS selector, you need to include the space between WGS and 84; that's where I got in trouble!).)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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