QGIS Build a new point layer

Robert Crowther Aug 2023

Many/most/all of the QGIS tutorials on the web summon information layers out of thin air “Here I have a layer listing all the fire hydrants in Paris…”. Perhaps this is because they are assembled by professionals who have been asked to make a pretty map of research by others? But what if you’ve collected/created the information yourself?

Layer data as a database

Layer data uses uses the same language as databases. For the good reason, layer data is a kind of database—even a Shapefile is a kind of database. If you’re not used to databases, you’ll be presented with incomprehensible options. You’ll need to muddle through, either ignoring things and hoping for the best, or diving into looking up about this world.

Second point, QGIS does not provide the usual database interaction, which is through SQL, or some modern equivalent like a JSON control line. QGIS provides a graphical user interface. Now, using a GUI to manage a database has notably failed in many places in the past, and has never taken hold much—for example, website data is largely worked by input through web forms, but anyone trying to manage website data turns to a query language on the commandline. Still QGIS needs to work for users not primarily interested in databases but in data, so uses GUIs. I must say, QGIS’s database GUIs are some of the best I’ve ever seen. But as well as the human advantage, they come with limitations. As we go on, I’ll mention.

Quickstart layer view creation

A new QGIS layer

Make a new layer, Shapefile or Geopackage, whatever,

Layer > Create Layer > New Geopackage Layer

When the dialogue pops up you’ll need to decide where to save it, maybe what CRS, and so forth. I leave that to you. The most important part her is the ‘geometry’. Set it to ‘Point’.

What is ‘geometry’?

‘Geometry’ is the form of location data that ‘features’ will have in this layer. For simple point data, ‘Geometry’ is X/Y coordinates. So, for a point layer, ‘geometry’ is an unintuitive word… but it would work for a ‘polygon’ feature layer, yes?

What is important here is that, far as I know, QGIS has no interface to change the geometry of a layer i.e. how the layer stores location data. Get this wrong, you’ll need to start data input all over again with a new layer. Ouch.

Fields

When you create a layer, you will be offered a chance to create fields, To save you now, fields can be added/deleted when creating the layer but also afterwards. Unlike ‘geometry’, you don’t need to get this right at the start.

The initial interface is limited to name and base data type. It’s a nice start, and if you know what you need, add some fields. The later GUIs offer more flexible options. I talk a lot more about fields in the layer editing article. However, for the sake of a run through… I move to….

Fields needed

You’ll need to decide what information you are gathering for each point. Suggestions, a ‘name’ and ‘description’ field are basic. There are more types of data you may wish to create, such as elevation, information about what is at each point and so forth. I leave that to you. QGIS will provide the ‘geometry’ as noted and, important, will automatically provide a unique identifier field called ‘fid’ which it will auto‐fill. So, for those who know about databases, you won’t need to worry about that.

Add a symbol

Initially, the new layer has no symbol at all, or a generic empty marker. This is not helpful, as you will see.

[Select the new…] Layer > [double click] Properties > Symbology

Select a marker for the new points (field records). I’d make the marker very distinctive, so it will stand out from the map. After data entry, the mark can be changed to make it fit visually. Right now, I’d want to see the new points over everything. I favour something like a large green diamond.

Create points (field records)

To create a point (‘field record’),

Now, every time you click somewhere on the map, you will be offered a field form to complete to make a new point. Don’t worry about getting your points in exactly the right place—you can use the ‘Vertex Tool’ to adjust the position later.

Warning ‐ do not create using the attribute table

It’s tempting, especially if you are a database person, to switch to the attribute table then use the ‘Add Feature’ button. But there is a big problem with this. The new point will be added without a geometry i.e. X/Y value. And, far as I know so far, there is no way to edit the geometry value. Presumably the geometry is set to ‘null’, the point will never appear, and can never be made to appear, in the map. Creation of features (database records) in the Attribute Table may be useful for some purposes, but not for a points layer designed to show displayable points.

The ‘Identify’ Tool

Handy to remember and try use this tool when creating new layer data. You can click on the new features from the map. And the display is the data from each record.

End

Ok, that’s the basic flow covered.