{"_id":"@turf/clusters-dbscan@7.4.0","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"3fca7b0605a8c938a4171f7f83dd4ff47ff1bd0b","tarball":"http://registry-npm.ywwl.com/@turf/clusters-dbscan/download/@turf/clusters-dbscan-7.4.0.tgz","fileCount":9,"integrity":"sha512-6uKPUvL7VNx3MueOqgGTx/pnGe5p5rgy/tA/6HOgRFLlDu0oYUTUdNg2JE0ylYOc0HW5hxCcmsRR0lz6fxw1KA==","signatures":[{"sig":"MEUCIQDS87BPzB3Zoa7ibq6c48IF2I2zj6fkYwgvHMlpeTxqzwIgejSNCgRjhKMN9oxDsf4cOTxoHxo0H9HdPtinhkwtHZY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDuRHxvBKhdyQxvTxEouhH4twhfGtGkgpd+RCLLwqsCpAiEAgZcrN3ouYcxT1kLqthD5VZKVOzSN9nbD56hl1Nu/nEk="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@turf%2fclusters-dbscan@7.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":40383,"size":8412,"noattachment":false,"key":"/@turf/clusters-dbscan/-/@turf/clusters-dbscan-7.4.0.tgz"},"main":"dist/cjs/index.cjs","name":"@turf/clusters-dbscan","type":"module","_from":"file:turf-clusters-dbscan-7.4.0.tgz","types":"dist/esm/index.d.ts","author":{"name":"Turf Authors"},"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","license":"MIT","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"},"version":"7.4.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7e112b35-d21a-4009-b37d-fe00ad9db0d4"}},"homepage":"https://github.com/Turfjs/turf","keywords":["turf","geojson","cluster","clusters","clustering","density","dbscan"],"_resolved":"/tmp/f8783dab5b6fecaa276c356abfcf6d0b/turf-clusters-dbscan-7.4.0.tgz","_integrity":"sha512-6uKPUvL7VNx3MueOqgGTx/pnGe5p5rgy/tA/6HOgRFLlDu0oYUTUdNg2JE0ylYOc0HW5hxCcmsRR0lz6fxw1KA==","repository":{"url":"git://github.com/Turfjs/turf.git","type":"git"},"_npmVersion":"11.17.0","description":"Takes a set of points and partition them into clusters according to DBSCAN's data clustering algorithm.","directories":{},"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"}],"sideEffects":false,"_nodeVersion":"26.5.1","contributors":[{"name":"Lukasz","email":"@uhho"},{"name":"Denis Carriere","email":"@DenisCarriere"},{"name":"Stefano Borghi","email":"@stebogit"}],"dependencies":{"rbush":"^3.0.1","tslib":"^2.8.1","@turf/meta":"7.4.0","@turf/clone":"7.4.0","@turf/helpers":"7.4.0","@turf/distance":"7.4.0","@types/geojson":"^7946.0.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.22.4","tape":"^5.10.2","tsup":"^8.5.1","benchmark":"^2.1.4","chromatism":"^3.0.0","concaveman":"^1.2.1","typescript":"^5.9.3","@types/tape":"^5.8.1","@types/rbush":"^3.0.4","@turf/centroid":"7.4.0","@turf/clusters":"7.4.0","load-json-file":"^7.0.1","write-json-file":"^6.0.0","@types/benchmark":"^2.1.5"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/clusters-dbscan_7.4.0_1785771023173_0.0934292461084183"},"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":1785771023281,"_cnpm_publish_time":1785771023281,"dist-tags":{"latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}