3

I have a map of a city and a .csv-file containing 700 geographic coordinates pointing to locations within that city.

How can I plot these 700 locations on the map?

0
3

Use the Delimited Text Data Source type to point to your CSV file, choose whether or not to have headers, choose the columns for X/Y/Z/M data, and then finally your CRS.

Make use of the Sample Data box to ensure you have the settings correct.

enter image description here

2

Create a column in your csv file named WKT

For each row, populate the column with: Point (longitude, latitude)

Save file

Add the data to QGIS project by using: Layer > Add Layer > Add Delimited Text Layer...

Set the Geometry Definition to Well Known Text and select WKT as the Geometry field and you should be good to go.

*Note: You must select an appropriate CRS! If your data is lat-lon then EPSG:4326 should do the trick, if your data is x-y then try EPSG 3857.

2

Tested on QGIS 2.18 and QGIS 3.4

Let's assume there is a .csv-file "data" with its attributes accordingly, see image below.

csv

Simply drag&drop it into QGIS, so it can appear in the 'Layers Panel', like this

csv_in_qgis

Then proceed with a "Virtual Layer" through Layer > Add Layer > Add/Edit Virtual Layer...

With the following Query, it is possible to plot locations on the map

SELECT *, make_point(lat, long)
FROM data

In case if you possess the exact CRS, you can adjust the above query with a corresponding EPSG code

SELECT *, setsrid(make_point(lat, long), 4326)
FROM data

Check the output

output

P.S. QGIS adores UTF-8


References:

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.