{"name":"@turf/clusters-dbscan","version":"7.3.5","keywords":["turf","geojson","cluster","clusters","clustering","density","dbscan"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/clusters-dbscan@7.3.5","maintainers":[{"name":"rowanwins","email":"rowanwins@yahoo.com.au"},{"name":"tmcw","email":"tom@macwright.com"},{"name":"morganherlocker","email":"morgan.herlocker@gmail.com"},{"name":"tcql","email":"tim.channell@gmail.com"},{"name":"mdfedderly","email":"mdfedderly@mdfedderly.com"},{"name":"twelch","email":"tim.j.welch@gmail.com"},{"name":"jamesmilneruk","email":"jamesmilner22@hotmail.com"},{"name":"morgan.herlocker","email":"morganherlocker@gmail.com"},{"name":"smallsaucepan","email":"james@smallsaucepan.com"}],"contributors":[{"name":"Lukasz","email":"@uhho"},{"name":"Denis Carriere","email":"@DenisCarriere"},{"name":"Stefano Borghi","email":"@stebogit"}],"homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"536ec668caab4d0de84effe726184bbb7ed7221b","tarball":"http://registry-npm.ywwl.com/@turf/clusters-dbscan/download/@turf/clusters-dbscan-7.3.5.tgz","fileCount":9,"integrity":"sha512-xdc0ccv2fyiUSWrJYJFE6RTluf8oVCB0/aCOdUD/ZvtG3eyqGIXMRMzAR1PujQHjBWtI+ndD4Eq+DqiGukGK+g==","signatures":[{"sig":"MEUCIQCMVfhrmZNYYegE6tdFuGbkIqOmOqsSjipvdp1LwCOZHwIgQ0Xt4CRV4sJ139+6iajr4tTRgWqcnZpSFKI2WTeVYqs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@turf%2fclusters-dbscan@7.3.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":40344,"size":8447,"noattachment":false,"key":"/@turf/clusters-dbscan/-/@turf/clusters-dbscan-7.3.5.tgz"},"main":"dist/cjs/index.cjs","type":"module","types":"dist/esm/index.d.ts","module":"dist/esm/index.js","exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.cts","default":"./dist/cjs/index.cjs"}},"./package.json":"./package.json"},"funding":"https://opencollective.com/turf","gitHead":"a33ca387405df72847af00cdf689d3209301a2c1","scripts":{"test":"pnpm run /test:.*/","bench":"tsx bench.ts","build":"tsup --config ../../tsup.config.ts","test:tape":"tsx test.ts","test:types":"tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7e112b35-d21a-4009-b37d-fe00ad9db0d4"}},"repository":{"url":"git://github.com/Turfjs/turf.git","type":"git"},"_npmVersion":"lerna/9.0.3/node@v20.20.2+x64 (linux)","description":"Takes a set of points and partition them into clusters according to DBSCAN's data clustering algorithm.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","dependencies":{"rbush":"^3.0.1","tslib":"^2.8.1","@turf/meta":"7.3.5","@turf/clone":"7.3.5","@turf/helpers":"7.3.5","@turf/distance":"7.3.5","@types/geojson":"^7946.0.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.4","tape":"^5.9.0","tsup":"^8.4.0","benchmark":"^2.1.4","chromatism":"^3.0.0","concaveman":"^1.2.1","typescript":"^5.8.3","@types/tape":"^5.8.1","@types/rbush":"^3.0.4","@turf/centroid":"7.3.5","@turf/clusters":"7.3.5","load-json-file":"^7.0.1","write-json-file":"^6.0.0","@types/benchmark":"^2.1.5"},"_npmOperationalInternal":{"tmp":"tmp/clusters-dbscan_7.3.5_1776600391391_0.3679596425908527","host":"s3://npm-registry-packages-npm-production"},"readme":"# @turf/clusters-dbscan\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n## Dbscan\n\nPoint classification within the cluster.\n\nType: (`\"core\"` | `\"edge\"` | `\"noise\"`)\n\n## DbscanProps\n\n**Extends GeoJsonProperties**\n\nProperties assigned to each clustered point.\n\nType: [object][1]\n\n### Properties\n\n*   `dbscan` **[Dbscan][2]?** type of point it has been classified as\n*   `cluster` **[number][3]?** associated clusterId\n\n## clustersDbscan\n\nTakes a set of [points][4] and partition them into clusters according to [DBSCAN's][5] data clustering algorithm.\n\n### Parameters\n\n*   `points` **[FeatureCollection][6]<[Point][4]>** to be clustered\n*   `maxDistance` **[number][3]** Maximum Distance between any point of the cluster to generate the clusters (kilometers by default, see options)\n*   `options` **[Object][1]** Optional parameters (optional, default `{}`)\n\n    *   `options.units` **Units** in which `maxDistance` is expressed, Supports all valid Turf [Units][7] (optional, default `\"kilometers\"`)\n    *   `options.mutate` **[boolean][8]** Allows GeoJSON input to be mutated (optional, default `false`)\n    *   `options.minPoints` **[number][3]** Minimum number of points to generate a single cluster,\n        points which do not meet this requirement will be classified as an 'edge' or 'noise'. (optional, default `3`)\n\n### Examples\n\n```javascript\n// create random points with random z-values in their properties\nvar points = turf.randomPoint(100, {bbox: [0, 30, 20, 50]});\nvar maxDistance = 100;\nvar clustered = turf.clustersDbscan(points, maxDistance);\n\n//addToMap\nvar addToMap = [clustered];\n```\n\nReturns **[FeatureCollection][6]<[Point][4], [DbscanProps][9]>** Clustered Points with an additional two properties associated to each Feature:*   {number} cluster - the associated clusterId\n*   {string} dbscan - type of point it has been classified as ('core'|'edge'|'noise')\n\n[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\n\n[2]: #dbscan\n\n[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number\n\n[4]: https://tools.ietf.org/html/rfc7946#section-3.1.2\n\n[5]: https://en.wikipedia.org/wiki/DBSCAN\n\n[6]: https://tools.ietf.org/html/rfc7946#section-3.3\n\n[7]: https://turfjs.org/docs/api/types/Units\n\n[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean\n\n[9]: #dbscanprops\n\n<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run \"yarn docs\" from the root of the turf project. -->\n\n---\n\nThis module is part of the [Turfjs project](https://turfjs.org/), an open source module collection dedicated to geographic algorithms. It is maintained in the [Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create PRs and issues.\n\n### Installation\n\nInstall this single module individually:\n\n```sh\n$ npm install @turf/clusters-dbscan\n```\n\nOr install the all-encompassing @turf/turf module that includes all modules as functions:\n\n```sh\n$ npm install @turf/turf\n```\n","publish_time":1776600391527,"_cnpm_publish_time":1776600391527,"dist-tags":{"latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}