[GRASS-user] Question about v.cluster DBSCAN

Moritz Lennert mlennert at club.worldonline.be
Sat Jul 18 09:16:11 PDT 2020


Hi Zac,

On 18/07/20 11:34, Zac45 wrote:
> Hi,
> 
> I am kinda new to GRASS and now dealing with a group of point data, but I
> failed to get output from the DBSCAN in v.cluster. It is kind of strange to
> me because I input the correct vector data but the output seems unchanged.
> Here are the command output:
> 
> Creating search index ...
> Estimating maximum distance ...
> Distance to the 1 nearest neighbor:
> Min: 4.53982, max: 32826.2
> Mean: 2192.14
> Standard deviation: 4348.38
> Estimated maximum distance: 13392.8
> Building clusters ...
> Generating renumbering scheme...
> Write out cluster ids ...
> Building topology for vector map <sites_clustered at grassdata>...
> Registering primitives...
> 7 clusters found
> 2 outliers found
> 
> But the output in display area shows the same data as the input.
> 
> Could you please help me with it?

By default, cluster ids are stored as category values of the points in 
layer 2.

If you just want to visualise them, you can use random coloring 
according to cat value (as in the examples in the man page):

d.vect -c map=sites_clustered layer=2 icon=basic/point size=10

or you can create an attribute table for layer 2 using:

v.db.addtable sites_clustered layer=2

and then visualise the cluster ids in this table.

Moritz


More information about the grass-user mailing list