[Qgis-user] Applying a label to a point in a series of points
Brent Wood
Brent.Wood at niwa.co.nz
Thu Nov 27 14:10:28 PST 2025
Hi & welcome...
I find this aspect is better addressed as a data management issue rather that a labelling one.
If your data is managed in database tables (Postgis, Spatialite, MariaDB/MySQL are the obvious free ones that work well with QGIS) then appending new points to existing lines and making lines from points is simple spatial data management. You can also set up a "view" - essentially a stored query acting like a physical table of data - returning, for example, the last point in a linestring.
If such a view is opened in QGIS with a label as well as the linestring itself without a label, both set to auto refresh every few seconds, then adding a point to a line in the db will be shown on the map automatically in both map layers as QGIS reloads the layer. The labelled point will move across the map as data is added to the db. This mimics the appearance of a GPS point moving on the map, but the data is read from the db instead of a live GPS.
Cheers,
Brent Wood
Principal Technician, Fisheries
NIWA
DDI: +64 (4) 3860529
________________________________
From: QGIS-User <qgis-user-bounces at lists.osgeo.org> on behalf of Phil via QGIS-User <qgis-user at lists.osgeo.org>
Sent: Friday, 28 November 2025 10:56
To: qgis-user at lists.osgeo.org <qgis-user at lists.osgeo.org>
Subject: [Qgis-user] Applying a label to a point in a series of points
Hello everyone,
I'm new to QGIS and started experimenting a couple of days ago.
I have created three layers in addition to the map layer.
1. My home location.
2. A csv file of aircraft locations.
3. A trail that joins points of the same aircraft to form a line. I have
a label on each of these trails.
I'm happy with the results so far.
Ideally, I'd like to label the first and last points in a trail instead
of all points as I have now. For example, if an aircraft has only been
logged once then that point should be labelled. If I have logged the
same aircraft multiple times then only the first last points should be
labelled.
My AI friend has tried to help by providing an assortment of label rules
but nothing has worked.
Here are the first 3 lines of 142 that I'm working with:
TIMESTAMP,AC_ID,LAT,LON
2025-11-21 23:55:36,71BE35,-33.962925,151.182806
2025-11-22 00:24:00,E80445,-33.958462,151.178686
2025-11-22 00:37:30,A47FDE,-33.971508,151.182120
I'll be grateful for any advice offered.
--
Regards,
Phil
_______________________________________________
QGIS-User mailing list
QGIS-User at lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user<https://lists.osgeo.org/mailman/listinfo/qgis-user>
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user<https://lists.osgeo.org/mailman/listinfo/qgis-user>
Brent Wood
Principal Technician - GIS and Spatial Data Management
+64-4-386-0529
301 Evans Bay Parade, Greta Point, Hataitai, Wellington, New Zealand
Earth Sciences New Zealand
[Earth Sciences New Zealand]<https://earthsciences.nz/>
The Institute of Geological and Nuclear Sciences Limited and the National Institute of Water and Atmospheric Research Limited joined to become the New Zealand Institute for Earth Science Limited. We are known as Earth Sciences New Zealand. For more information on the Earth Sciences transition click here<https://niwa.co.nz/about-niwa/science-sector-reforms>.
Notice: This email may contain information which is confidential and/or subject to copyright, and may not be used, published or redistributed without the prior written consent of Earth Sciences New Zealand. If you are not the intended recipient, please immediately notify the sender and delete the email and any attachments. Any opinion or views expressed in this email are those of the individual sender and may not represent those of Earth Sciences New Zealand.
For information about how we process data and monitor communications please see our privacy policy<https://niwa.co.nz/about-niwa/privacy-policy>.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20251127/85e46fa9/attachment.htm>
More information about the QGIS-User
mailing list