{"id":20854417,"url":"https://github.com/w8r/hilbert","last_synced_at":"2025-05-12T05:31:53.510Z","repository":{"id":57264254,"uuid":"103424067","full_name":"w8r/hilbert","owner":"w8r","description":"2D Hilbert curve coordinate encoder/decoder","archived":false,"fork":false,"pushed_at":"2017-12-13T17:25:17.000Z","size":10,"stargazers_count":10,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-28T19:07:14.391Z","etag":null,"topics":["geohashing","geometry","hilbert-curve","space-filling-curves","spatial-index"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/w8r.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-13T16:32:34.000Z","updated_at":"2025-02-11T03:19:09.000Z","dependencies_parsed_at":"2022-08-25T02:51:59.321Z","dependency_job_id":null,"html_url":"https://github.com/w8r/hilbert","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w8r%2Fhilbert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w8r%2Fhilbert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w8r%2Fhilbert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w8r%2Fhilbert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/w8r","download_url":"https://codeload.github.com/w8r/hilbert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253682369,"owners_count":21946920,"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":["geohashing","geometry","hilbert-curve","space-filling-curves","spatial-index"],"created_at":"2024-11-18T03:25:42.458Z","updated_at":"2025-05-12T05:31:53.213Z","avatar_url":"https://github.com/w8r.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hilbert-2D [![npm version](https://badge.fury.io/js/hilbert-2d.svg)](https://badge.fury.io/js/hilbert-2d) [![CircleCI](https://circleci.com/gh/w8r/hilbert.svg?style=svg)](https://circleci.com/gh/w8r/hilbert)\n\n2D [Hilbert curve](https://en.wikipedia.org/wiki/Hilbert_curve) coordinate encoder/decoder\n\n![Hilbert-gif](https://upload.wikimedia.org/wikipedia/commons/4/46/Hilbert_curve.gif);\n\nThe code is ported from Go to JS from https://github.com/google/hilbert/\nInlined rotations to eliminate function calls.\n\n## Install\n\n```\nnpm install -S hilbert-2d\n```\n\n## API\n\n```js\nconst h = require('hilbert-2d');\n\nh.encode(16, [12, 23]); // 837\nh.decode(16, 837);      // [12, 23]\n```\n\n## TODO\n\n- [ ] Add range queries and sorting\n- [ ] Add examples\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fw8r%2Fhilbert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fw8r%2Fhilbert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fw8r%2Fhilbert/lists"}