[Qgis-user] QGIS - Cluster Points alongside lines by a limit

Thayer Young thayeray at yahoo.com
Tue Nov 29 08:37:48 PST 2022


Hi Fabian,
Assuming 2 things, first that you lines have a unique ID field, and second that you are not concerned with network connectivity:   You can use the "Join Attributes by Nearest" tool. Set your points to input layer1 and your lines to layer 2. For the "Layer 2 fields to copy" choose the unique ID for the lines. Set the "Maximum nearest neighbors" to 10. 
You would then categorize the symbology by the line unique id.
-Thayer


Date: Tue, 29 Nov 2022 13:29:10 +0000
From: Fabian Laumer <F.Laumer at hpe-planung.de>
To: "qgis-user at lists.osgeo.org" <qgis-user at lists.osgeo.org>
Subject: [Qgis-user] QGIS - Cluster Points alongside lines by a limit
Message-ID: <6de8cbd3b97447f9b9cd6364e4e847a8 at hpe-planung.de>
Content-Type: text/plain; charset="us-ascii"

Hello together,

in QGIS I have a street layer (lines) and a house layer (points) with a start point.
(picture 1)

I want to cluster the points alongside the line layer in groups of 20 or 10 points. The result should look like that:
(picture 2)

Each coloured line in picture 2 represents a different cluster. The result was made manually and took a long time, is there any possibility to cluster the points automatically?

I prefer groups of 20 and 10 points per line, in some cases I have to use a bit less or more.


You can find the picutures and the layer examples here:
Sync.com - Cluster Points alongside Lines<https://ln5.sync.com/dl/970d2d420/zp8webf5-hghnis7b-dewfmeug-vdx7saav>



Thanks in advance!

Best regards,
Fabian Laumer
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20221129/36867bbc/attachment.htm>


More information about the Qgis-user mailing list