4

In QGIS:

I have data of sightings of a particular animal that has been mapped as points. Some of these may be repeated sightings. I've classed the sightings according to 'SightCode' which represents the number of adults and juveniles in the sighting. I also have the Date of the sighting by YYMM.

For example, here I show the symbols as older (start of the year) to newest (recent month), and labels for SightCode.

enter image description here

How can I cluster the points so that they are grouped by proximity and attributes?

Ie. Show only recent sightings after January 2019 ~ 1901, then group those by SightCode and proximity so that sightings within say 1km of each other that are 1 Adult 3 Juveniles ~ 1A3J are only shown as 1 point and not x# of points.

The cluster point cluster symbology allows the symbols to show without the recent timing set when zoomed in, but when zooming out it also clusters all points without classifying those according to SightCode (it just lumps them all as a number). Attribute based clustering doesn't seem to take distance into account. I can't seem to get concave hull to work, I just get errors so not sure if that is the right tool anyway.

Any other ideas?

Edit 1 8/4/20: I tried DBSCAN as the first step but it's grouping a large number of points together that I would like to have seen separation with. See below. Where individual points are far apart, they were still clustered as one, because individual points were close... (green points). How to separate these out based on distance before progressing to the next steps?

enter image description here

  • The colors of the dots represent the date of the observation? Can you add a legend (or an explanation) to interpret them? – Gabriel De Luca Nov 25 '19 at 23:36
  • 1
    Unless these are elephants I would discard the juvenile count, there's a good chance that the observer may have not seen one or more (if present), likewise 2 adults become 1 adult if that's all the observer sees. All you can say from this data is that the species is generally present and that they can be seen where people are.. it reminds me of a crowd sourced koala survey, when compiled the data showed that koalas like asphalt - because the majority of the sightings were from the roadside! There could be thousands more where people don't like to go. – Michael Stimson Nov 26 '19 at 0:55
  • Have you tried DBSCAN from the toolbox? – Erik Nov 26 '19 at 8:00
  • @Caragh try increasing the maximum distance between clustered points in the DBSCAN dialog box. Think of it as the distance beyond which you want it to treat the group like a separate cluster. – she_weeds yesterday
0

Try this:

  1. Create clusters with DBSCAN, this will create a layer (default name is Clusters) with the same number of features, but with the additional field CLUSTER_ID
  2. Collect points with the same CLUSTER_ID into a multi-geometry layer with Collect geometries. This will create the collected layer.
  3. Create centroids for each cluster with the Centroids tool

If you are not satisfied with the default options, try tweaking these parameters:

  • EPS Maximum distance between clustered points (maybe insert a shorter distance)
  • DBSCAN* Treat border points as noise (DBSCAN*)
|improve this answer|||||
  • 1
    Thanks. DBSCAN sort of got part way through the job, however I have a pickle. DBSCAN grouped a whole bunch of sightings together where I was hoping for more separation, simply because they are a string. See edit to original post. – Caragh yesterday
  • I see, this looks as a setting problem, see my edited answer :) – RafDouglas yesterday

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.