Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
@dentreality/geodbscan
Advanced tools
A geospatial implementation of the DBSCAN clustering algorithm
GeoDBSCAN provides a simple JavaScript implementation and API for the DBSCAN clustering algorithm using a geographic distance function. This allows developers to create clusters based on the geographic density of the points. The code is a modernisation and extension of density-clustering.
Interested in this kind of work? Dent Reality is hiring!
npm install geodbscan
GeoDBSCAN only has one method, namely cluster
. It is used like this:
// GeoDBSCAN accepts arrays of [number, number] coordinates
// Here let's assume points is an array of GeoJSON points
const coords = points.map((point) => point.geometry.coordinates);
// Now we can generate our clusters
const clusters = geodbscan.cluster(coords, {
minPts: 2,
epsilon: 1000,
});
// An Array of Arrays that contain the indexs
// of the coordinates in the cluster
// (from the 'coords' variable)
// [
// [0, 4, 5, 3],
// [1, 2],
// [6, 7, 8, 9, 10, 11, 12, 18, 16, 17, 14, 15, 19, 20, 21, 13],
// ]
It takes a second options object argument which has two properties:
We welcome contributions to the library. The code is written in TypeScript, bundled with microbundle and tested with Jest.
npm run test
npm run build
or in watch mode:
npm run watch
MIT License
FAQs
A geospatial implementation of the DBSCAN clustering algorithm
The npm package @dentreality/geodbscan receives a total of 7 weekly downloads. As such, @dentreality/geodbscan popularity was classified as not popular.
We found that @dentreality/geodbscan demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.