Creating point features with exact coordinates in QGIS?
How do I create point features with exact (manually entered) coordinates in QGIS?
I get precise GPS coordinates from a survey team which I need to add to a point layer. What I want: -Add point, type in the coordinates and when pressing enter the point is created where it is supposed to be.
Use plugin Numerical Vertex Edit (https://plugins.qgis.org/plugins/numericalVertexEdit/). Or create table with Lat/Lon/Name and save in csv, then load csv table in QGIS (Add Delimited text layer) (info gis-lab.info)
No Plugin Required
This is possible with QGIS without extra plugins using the Advanced Digitizing panel. This tool allows entering exact coordinate values as well as constructing points at given distance and angle from other points.
The advanced digitizing tools are not available in geographic coordinates.
Pictures taken from this excellent answer which gives a walkthrough.
@Mathias How do you validate the first point? It's pretty clear how it works once you have the first point. (for both points, lines and polygons).
Does it not work if you just enter coordinates and then click somewhere on the map canvas like you do for subsequent points?
Note: the advanced digitizing tools are not enabled if the map view is in geographic coordinates: https://docs.qgis.org/2.18/en/docs/user_manual/working_with_vector/editing_geometry_attributes.html#the-advanced-digitizing-panel
You need to install the 'Numerical Digitize' plugin first.
Then you can use
Numerical Digitizecommand to Create points in QGIS with exact (manually entered) precise coordinates.
Numerical Digitizecommand is found on the
Make sure your
Toggle Editingis on for the layer you want to digitize (add coordinates to), so that
Numerical Digitizebutton will be active.
You can do this for both point and polygon data.
I prefer HasT's second solution if there are more than a handful of points. Enter coordinates (separate X and Y columns), labels and any other data in your spreadsheet of choice. Save in CSV format and use "Add Delimited Text Layer" to add in your points as a layer:
and a window comes up asking you which columns to use as X & Y coordinates and other options.
Edited to add: see also this tutorial linked at the QGIS Wiki.
Thank you for your answers. But if I use csv-import it will end up in a new separate layer. I created some test points just so earlier this morning. Then I have to merge that layer to my existing layer and it feels like an unnatural workaround when it most often isn't more than a handful of points to add. I will look at the Numerical Vertex Edit and see if it is what I am looking for. I still think an option to manually define coordinates when creating new points would be of great added value to QGIS.
Do you need to maintain the data in a shapefile? As you create a set of data, you could view it in QGIS, then export it back to a csv - use MMQGIS export geometery, or copy the data direct from the attribute table. Maintain a list in csv or spreadsheet form which can easily have new points and attributes added. As need be, load that file up via the Add Delimited Text Layer dialog. I do this a bit and it works fine. You need to consider how to keep the integrity of data, which is one reason why adding to an existing file is a good methodology.
In QGIS 3, the NumericalDigitize tool no longer seems to be available but here is a further solution. As of QGIS 3 you can simply copy and past WKT directly into the canvas. This works for single or multiple features all in one go eg:
point(543100 177100) point(543250 206850) point(561800 206850)
polygon((123456 654321, 123456 765432, 234567 765432, 234567 654321))
This is less fiddly for multiple features than the Advanced Digitize Plugin.
No plugin, CAD digitalized or field calculator was necessary for me.
Just put the table in edit mode, add a vector point to the map, then use the Node Tool. You can drag the point with it, or by clicking your point you can edit the coordinates. Good luck !
You could abuse the 'Azimuth and Distance' plug-in to do this. Enter the x and y ordinates in the 'Starting vertex' boxes and press 'Draw'. The point shapefile has to be in edit mode. I'm not sure which repository has this plug-in, but a Google search will find it. If you're entering lat/lon coordinates remember that lat is 'y' and lon is 'x'. N.
Another way of doing it would be to first enter the measured coordinates in a spreadsheet, save it as .csv and import it to a separate layer and then snap-add new points in the live layer to the temorary one just imported from the csv-table. It works, but again, in my humble opinion, it is a lot of work just to add some points where I want them. The reason I am interested in solving this issue is because I am curious to see if I can introduce QGIS at my workplace. I use n and e as in northing and easting to avoid confusion when different programs defines x and y differently. Thanks again!
Another option is to use QGIS's virtual layer functionality. Just click the 'Add Virtual Layer' icon near the bottom of the left hand tool bar and enter the following into the query window (subbing your values for the parameters in the
SELECT 1 as id, MakePoint(x, y, srid) as geom
If you want to create multiple points this syntax can be used:
SELECT 1 as id, MakePoint(x1, y1, srid) as geom UNION SELECT 2, MakePoint(x2, y2, srid)
The plug-in Lat Lon Tools comes with a points digitizing tool called "Lat Lon Digitize" that lets you easily achieve this. Once activated, the corresponding button appears in the Digitize toolbar and looks like this:
Simply have a look at the plug-in's official README, section "Points Digitizing Tool", to get started (actually, the whole process is rather self-explaining).