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?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityUse 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.
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.
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.
Simply drag&drop it into QGIS, so it can appear in the 'Layers Panel'
, like this
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
P.S. QGIS adores UTF-8
References: