Allow aggregating properties in turf-clusters-dbscan
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- TypeScript
- Stars
- 10.5k
- Forks
- 1k
- Avg merge
- 1h 11m
- Merged PRs (30d)
- 4
Description
clustersDbscan() does not allow any way to determine which source points have been grouped in each cluster, or a way to aggregate properties in that cluster.
It would be helpful if one or both of these options were supported:
- a
clusterIdsoption, which if true would include aclusterIdsproperty, an array ofids of each feature in the cluster. - an
aggregateFuncoption, a function which would be called with a feature being clustered, and the cluster it is being grouped into.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the clustersDbscan() entry point and inspect how clustered features and their properties are currently produced. Determine whether clusterIds, aggregateFunc, or both should be supported, then add coverage for the chosen behavior and verify that clustered output exposes the requested source-point information or aggregation result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100