{"name":"@turf/clusters-dbscan","version":"7.3.2","keywords":["turf","geojson","cluster","clusters","clustering","density","dbscan"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/clusters-dbscan@7.3.2","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":"986107d5564773ff37a512cc284eebea6fc72def","tarball":"http://registry-npm.ywwl.com/@turf/clusters-dbscan/download/@turf/clusters-dbscan-7.3.2.tgz","fileCount":9,"integrity":"sha512-g6gnzeoDmwwf/GSkf+c0svMpFPgjRcJAEifQig73Q5gNPOrhcHoA8gsRe1PxJrVgkYytB2QWYlZXfkQQG3BmCg==","signatures":[{"sig":"MEUCIQCDlUNUO291jAFUOdmOQTQKoyEWuG8awl2udIM07+qpggIge03NFDvPjzWL5abQQxU1yB13fq5pKZ7NtmpjbCDcgkw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35783,"size":7812,"noattachment":false,"key":"/@turf/clusters-dbscan/-/@turf/clusters-dbscan-7.3.2.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":"099d9915467bacf45d554be4533fa9998c4efc88","scripts":{"docs":"tsx ../../scripts/generate-readmes.ts","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":"mdfedderly","email":"mdfedderly@mdfedderly.com"},"repository":{"url":"git://github.com/Turfjs/turf.git","type":"git"},"_npmVersion":"lerna/9.0.3/node@v20.19.6+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.19.6","dependencies":{"tslib":"^2.8.1","kdbush":"^4.0.2","geokdbush":"^2.0.1","@turf/meta":"7.3.2","@turf/clone":"7.3.2","@turf/helpers":"7.3.2","@types/geojson":"^7946.0.10","@types/geokdbush":"^1.1.5"},"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","@turf/centroid":"7.3.2","@turf/clusters":"7.3.2","load-json-file":"^7.0.1","write-json-file":"^6.0.0","@types/benchmark":"^2.1.5"},"_npmOperationalInternal":{"tmp":"tmp/clusters-dbscan_7.3.2_1768358878173_0.11963762585434878","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":1768358878316,"_cnpm_publish_time":1768358878316,"dist-tags":{"latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}