{"id":15440601,"url":"https://github.com/glassonion1/world-grid-square-ts","last_synced_at":"2025-04-19T19:35:19.704Z","repository":{"id":65808068,"uuid":"599127749","full_name":"glassonion1/world-grid-square-ts","owner":"glassonion1","description":"The world grid square is extension of JIS X0410(a.k.a. Japan Mesh Code) worldwide. This library is utilities for the world grid square.","archived":false,"fork":false,"pushed_at":"2024-12-29T02:01:00.000Z","size":327,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T12:22:15.823Z","etag":null,"topics":["geocode","geohash","geolocation","geospatial","gis","jismesh","jpmesh","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/glassonion1.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-02-08T14:08:34.000Z","updated_at":"2025-01-18T01:36:13.000Z","dependencies_parsed_at":"2024-01-15T01:07:59.340Z","dependency_job_id":"cd4ee946-e8ce-4191-aa11-df47e958fffa","html_url":"https://github.com/glassonion1/world-grid-square-ts","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":0.09677419354838712,"last_synced_commit":"2c0921d4024277b4136e21f7fd4be3742944cf60"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glassonion1%2Fworld-grid-square-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glassonion1%2Fworld-grid-square-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glassonion1%2Fworld-grid-square-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glassonion1%2Fworld-grid-square-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glassonion1","download_url":"https://codeload.github.com/glassonion1/world-grid-square-ts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249292149,"owners_count":21245467,"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":["geocode","geohash","geolocation","geospatial","gis","jismesh","jpmesh","typescript"],"created_at":"2024-10-01T19:14:36.783Z","updated_at":"2025-04-19T19:35:19.682Z","avatar_url":"https://github.com/glassonion1.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# World Grid Square\n[![npm version](https://badge.fury.io/js/global-mercator.svg)](https://badge.fury.io/js/world-grid-square)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/glassonion1/world-grid-square-ts/main/LICENSE)\n\nThe world grid square is extension of JIS X0410(a.k.a Japan Mesh Code) worldwide. This library is utilities for the world grid square.\n\nWorld grid square outlined here: https://www.fttsus.org/worldgrids/en/top-en/\n\n## Compartment type\n- 1st level 80km grid\n- 2nd level 10km grid\n- 3rd level 1km grid\n- 4th level 500m grid\n- 5th level 250m grid\n- 6th level 125m grid\n- 7th level 25m grid(extension spec)\n- 8th level 12.5m grid(extension spec)\n- 9th level 5m grid(extension spec)\n\n## Install\n```\n$ npm install world-grid-square\n```\nor\n```\n$ yarn add world-grid-square\n```\nor\n```\n$ pnpm add world-grid-square\n```\n\n## Usage\nfrom longitude and latitude to code\n```ts\nimport { wgs } from 'world-grid-square'\n\nconst code = wgs.pointToCode(139.745433, 35.658581, 6)\n// 2053393599212\nconsole.log(code)\n```\nfrom code to longitude and latitude\n```ts\nimport { wgs } from 'world-grid-square'\n\nconst point = wgs.codeToPoint('2053393599212')\n// 139.7453125, 35.65833333333333\nconsole.log(point)\n```\n## Usage for JIS Grid Square\nfrom longitude and latitude to jis code\n```ts\nimport { wgs } from 'world-grid-square'\n\nconst code = wgs.pointToJisCode(139.745433, 35.658581, 6)\n// 53393599212\nconsole.log(code)\n```\nfrom jis code to longitude and latitude\n```ts\nimport { wgs } from 'world-grid-square'\n\nconst point = wgs.jisCodeToPoint('53393599212')\n// 139.7453125, 35.65833333333333\nconsole.log(point)\n```\n\n## Demo using map\nHere is a demo that actually draws the world grid square on the map using this library.  \nhttps://9revolution9.com/tools/geo/geocode/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglassonion1%2Fworld-grid-square-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglassonion1%2Fworld-grid-square-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglassonion1%2Fworld-grid-square-ts/lists"}