{"id":20826798,"url":"https://github.com/arkaung/quadtree","last_synced_at":"2026-04-29T03:02:53.701Z","repository":{"id":255852130,"uuid":"853722060","full_name":"ArkAung/quadtree","owner":"ArkAung","description":"Quadtree implementation in Dart","archived":false,"fork":false,"pushed_at":"2024-09-07T13:26:40.000Z","size":13,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-18T17:07:40.090Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","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/ArkAung.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2024-09-07T10:54:58.000Z","updated_at":"2025-10-15T08:08:01.000Z","dependencies_parsed_at":"2024-09-07T14:07:02.468Z","dependency_job_id":null,"html_url":"https://github.com/ArkAung/quadtree","commit_stats":null,"previous_names":["arkaung/quadtree"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ArkAung/quadtree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArkAung%2Fquadtree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArkAung%2Fquadtree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArkAung%2Fquadtree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArkAung%2Fquadtree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArkAung","download_url":"https://codeload.github.com/ArkAung/quadtree/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArkAung%2Fquadtree/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32408446,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T02:37:21.628Z","status":"ssl_error","status_checked_at":"2026-04-29T02:36:50.947Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-17T23:10:08.324Z","updated_at":"2026-04-29T03:02:53.681Z","avatar_url":"https://github.com/ArkAung.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quadtree\n\n[![Pub Version](https://img.shields.io/pub/v/quadtree.svg)](https://pub.dev/packages/quadtree)\n[![Dart SDK Version](https://badgen.net/pub/sdk-version/quadtree)](https://pub.dev/packages/quadtree)\n[![codecov](https://codecov.io/gh/arkaung/quadtree/branch/main/graph/badge.svg)](https://codecov.io/gh/arkaung/quadtree)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Pub Points](https://img.shields.io/pub/points/quadtree)](https://pub.dev/packages/quadtree/score)\n\nA fast and efficient quadtree implementation in Dart for spatial partitioning and range queries.\n\n## Features\n\n- Efficient spatial partitioning for 2D space\n- Fast point insertion and range queries\n\n## Installation\n\nAdd `quadtree` to your `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  quadtree: ^0.1.0\n```\n\nThen run:\n\n```\ndart pub get\n```\n\n## Usage\n\nHere's a quick example of how to use the Quadtree package:\n\n```dart\nimport 'package:quadtree/quadtree.dart';\n\nvoid main() {\n  // Create a quadtree with a boundary of 100x100\n  final quadtree = Quadtree(Rectangle(0, 0, 100, 100));\n\n  // Insert some points\n  quadtree.insert(Point(10, 20, 'data 1'));\n  quadtree.insert(Point(50, 50, 'data 2'));\n  quadtree.insert(Point(80, 15, 'data 3'));\n\n  // Query points within a range\n  final pointsInRange = quadtree.query(Rectangle(0, 0, 60, 60));\n  print('Points in range: ${pointsInRange.length}');\n\n  // You can also associate data with points\n  quadtree.insert(Point(25, 35, 'Some data'));\n\n  // Retrieve points with their associated data\n  final pointsWithData = quadtree.query(Rectangle(20, 30, 10, 10));\n  for (var point in pointsWithData) {\n    print('Point at (${point.x}, ${point.y}) with data: ${point.data}');\n  }\n}\n```\n\n## API Reference\n\n### `Quadtree`\n\nThe main class for the quadtree data structure.\n\n#### Constructor\n\n- `Quadtree(Rectangle boundary, [int capacity = 4])` : Creates a new quadtree with the given boundary and capacity.\n\n#### Methods\n\n- `bool insert(Point point)` : Inserts a point into the quadtree.\n- `List\u003cPoint\u003e query(Rectangle range)` : Returns all points within the given range.\n\n### `Point`\n\nRepresents a point in 2D space.\n\n#### Constructor\n\n- `Point(double x, double y, [dynamic data])` : Creates a new point with optional associated data.\n\n### `Rectangle`\n\nRepresents a rectangular boundary.\n\n#### Constructor\n\n- `Rectangle(double x, double y, double width, double height)` : Creates a new rectangle.\n\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farkaung%2Fquadtree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farkaung%2Fquadtree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farkaung%2Fquadtree/lists"}