{"id":22367321,"url":"https://github.com/chargetrip/supercluster-rs","last_synced_at":"2025-07-30T17:32:48.289Z","repository":{"id":205750003,"uuid":"714988318","full_name":"chargetrip/supercluster-rs","owner":"chargetrip","description":"A very fast Rust crate for geospatial point clustering.","archived":false,"fork":false,"pushed_at":"2024-10-21T13:24:09.000Z","size":80,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-21T21:08:12.580Z","etag":null,"topics":["clustering-algorithm","geospatial","mapbox-vector-tile","maps","mvt","rust","supercluster","tile"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/supercluster","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chargetrip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-06T09:01:25.000Z","updated_at":"2024-10-21T13:26:15.000Z","dependencies_parsed_at":"2024-10-21T22:20:32.756Z","dependency_job_id":null,"html_url":"https://github.com/chargetrip/supercluster-rs","commit_stats":{"total_commits":22,"total_committers":1,"mean_commits":22.0,"dds":0.0,"last_synced_commit":"5ebe02b16660a514497017b903431e11e7221e2a"},"previous_names":["chargetrip/supercluster-rust","chargetrip/supercluster-rs"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chargetrip%2Fsupercluster-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chargetrip%2Fsupercluster-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chargetrip%2Fsupercluster-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chargetrip%2Fsupercluster-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chargetrip","download_url":"https://codeload.github.com/chargetrip/supercluster-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228164489,"owners_count":17879085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clustering-algorithm","geospatial","mapbox-vector-tile","maps","mvt","rust","supercluster","tile"],"created_at":"2024-12-04T18:17:06.610Z","updated_at":"2025-07-30T17:32:48.278Z","avatar_url":"https://github.com/chargetrip.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Supercluster\n\nA high-performance Rust crate for geospatial and non-geospatial point clustering.\n\n## Reference implementation\n\n[![test](https://github.com/chargetrip/supercluster-rs/actions/workflows/test.yml/badge.svg)](https://github.com/chargetrip/supercluster-rs/actions/workflows/test.yml)\n[![docs](https://docs.rs/supercluster/badge.svg)](https://docs.rs/supercluster)\n[![crate](https://img.shields.io/crates/v/supercluster.svg)](https://crates.io/crates/supercluster)\n![downloads](https://img.shields.io/crates/d/supercluster)\n![GitHub](https://img.shields.io/github/license/chargetrip/supercluster-rs)\n[![codecov](https://codecov.io/gh/chargetrip/supercluster-rs/graph/badge.svg?token=0S31CZY2ZJ)](https://codecov.io/gh/chargetrip/supercluster-rs)\n\n![Features](https://cloud.githubusercontent.com/assets/25395/11857351/43407b46-a40c-11e5-8662-e99ab1cd2cb7.gif)\n\n## Documentation\n\nFor more in-depth details, please refer to the full [documentation](https://docs.rs/supercluster).\n\nIf you encounter any issues or have questions that are not addressed in the documentation, feel free to [submit an issue](https://github.com/chargetrip/supercluster-rs/issues).\n\nThis crate was initially inspired by Mapbox's supercluster [blog post](https://blog.mapbox.com/clustering-millions-of-points-on-a-map-with-supercluster-272046ec5c97).\n\n## Usage\n\nTo use the `supercluster` crate in your project, add it to your `Cargo.toml`:\n\n```toml\n[dependencies]\nsupercluster = \"3.0.4\"\n```\n\nYou can also include additional features, such as logging, by specifying them in your `Cargo.toml`:\n\n```toml\n[dependencies]\nsupercluster = { version = \"3.0.4\", features = [\"log\", \"serde\", \"cluster_metadata\"] }\n```\n\nBelow is an example of how to create and run a supercluster using the crate.\nThis example demonstrates how to build supercluster options, create a new supercluster, and get a tile.\nFor more detailed information and advanced usage, please refer to the full [documentation](https://docs.rs/supercluster).\n\n```rust\nuse supercluster::{ CoordinateSystem, Supercluster, SuperclusterError };\n\nfn main() -\u003e Result\u003c(), SuperclusterError\u003e {\n    // Set the configuration settings\n    let options = Supercluster::builder()\n        .radius(40.0)\n        .extent(512.0)\n        .min_points(2)\n        .max_zoom(16)\n        .coordinate_system(CoordinateSystem::LatLng)\n        .build();\n\n    // Create a new instance with the specified configuration settings\n    let mut cluster = Supercluster::new(options);\n\n    // Create a a list of features\n    let features = Supercluster::feature_builder()\n        .add_point(vec![0.0, 0.0])\n        .build();\n\n    // Load a list of features into the supercluster\n    let index = cluster.load(features)?;\n\n    index.get_tile(0, 0.0, 0.0)?;\n\n    Ok(())\n}\n```\n\n## Benchmarks\n\nWe use the `criterion` crate to benchmark the performance of the `supercluster` crate.\n\nBenchmarks help us understand the performance characteristics of supercluster and identify areas for optimization.\n\nWe have several benchmark scenarios to test different aspects of supercluster:\n\n- **Getting a Tile**: Tests the performance of retrieving a tile from the `Supercluster`.\n- **Getting Clusters**: Tests the performance of retrieving clusters for a given bounding box and zoom level.\n- **Loading a Feature Collection**: Tests the performance of loading a `FeatureCollection` into the `Supercluster`.\n\nFor more detailed benchmark scenarios, please refer to the [`benches`](https://github.com/chargetrip/supercluster-rs/tree/main/benches) directory in the repository.\n\n## Safety\n\nThis crate uses `#![forbid(unsafe_code)]` to ensure everything is implemented in 100% safe Rust.\n\n## Contributing\n\n🎈 Thanks for your help improving the project! We are so happy to have you!\n\nWe have a [contributing guide](https://github.com/chargetrip/supercluster-rs/blob/main/CONTRIBUTING.md) to help you get involved in the project.\n\n## Sponsors\n\n\u003ca href=\"https://www.chargetrip.com\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://dka575ofm4ao0.cloudfront.net/pages-transactional_logos/retina/149188/Chargetrip_Combined_-_Black.png\" width=\"240\" alt=\"Chargetrip\"\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchargetrip%2Fsupercluster-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchargetrip%2Fsupercluster-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchargetrip%2Fsupercluster-rs/lists"}