{"id":20625269,"url":"https://github.com/rastenis/gps-scramble","last_synced_at":"2025-04-15T15:05:19.531Z","repository":{"id":35026994,"uuid":"198037398","full_name":"rastenis/gps-scramble","owner":"rastenis","description":"A tool for controlled randomization of GPS coordinates.","archived":false,"fork":false,"pushed_at":"2023-03-04T04:22:28.000Z","size":728,"stargazers_count":10,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T15:05:07.609Z","etag":null,"topics":["coordinates","geocoding","gps","spoof"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rastenis.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-21T09:27:12.000Z","updated_at":"2025-02-18T08:54:57.000Z","dependencies_parsed_at":"2023-01-15T12:18:29.081Z","dependency_job_id":null,"html_url":"https://github.com/rastenis/gps-scramble","commit_stats":null,"previous_names":["scharkee/gps-scramble"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rastenis%2Fgps-scramble","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rastenis%2Fgps-scramble/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rastenis%2Fgps-scramble/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rastenis%2Fgps-scramble/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rastenis","download_url":"https://codeload.github.com/rastenis/gps-scramble/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249094931,"owners_count":21211837,"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":["coordinates","geocoding","gps","spoof"],"created_at":"2024-11-16T13:09:00.050Z","updated_at":"2025-04-15T15:05:19.497Z","avatar_url":"https://github.com/rastenis.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gps-scramble\n\n[![npm version](http://img.shields.io/npm/v/gps-scramble.svg?style=flat)](https://npmjs.org/package/gps-scramble \"View this project on npm\")\n[![Status](https://travis-ci.org/scharkee/gps-scramble.svg?branch=master)](https://travis-ci.org/scharkee/gps-scramble)\n[![Coverage Status](https://coveralls.io/repos/github/Scharkee/gps-scramble/badge.svg?branch=master)](https://coveralls.io/github/Scharkee/gps-scramble?branch=master)\n[![David](https://img.shields.io/david/scharkee/gps-scramble.svg)](https://david-dm.org/scharkee/gps-scramble)\n\nA tool for controlled randomization/spoofing of GPS coordinates.\n\n## Features\n\n- Generate similar coordinates within a distance of given coordinates\n- Location name based coordinate generation (geocoding), resolve coordinates by location name\n- Generate the coordinates of a random establishment near the given coordinates\n\n## Install\n\n```bash\n$ npm install gps-scramble\n```\n\n## Usage\n\n```js\nconst { Scrambler } = require(\"gps-scramble\");\nlet scrambler = new Scrambler([40.758896, -73.98513]);\nconsole.log(scrambler.within(100, \"m\")); // randomized location within 100 meters from given coordinates.\nconsole.log(scrambler.near()); // randomized location near given coordinates.\n```\n\n## Advanced usage (Geocoding)\n\n```js\nconst { ScramblerAsync } = require(\"gps-scramble\");\nlet scrambler = new ScramblerAsync(\"Times Square\");\n\nlet location = await scrambler.within(100, \"m\");\nconsole.log(location.x, location.y); // randomized location within 100 meters from Times Square\n\nlocation = await scrambler.near();\nconsole.log(location.x, location.y); // randomized location near Times Square\n\nlocation = await scrambler.nearbyEstablishment();\nconsole.log(location.x, location.y); // randomized location of a business near Times Square\n```\n\n## Geocoding support\n\nTo enable geocoding support (powered by Bing Maps Geocoding API), you must get an API key.\nThe process of getting a key is described [here](https://docs.microsoft.com/en-us/bingmaps/getting-started/bing-maps-dev-center-help/getting-a-bing-maps-key)\n\nThe key must be loaded as an enviromental variable named `BING_API_KEY`.\n\n## Units\n\nSupported units are: \"mm\" - milimeters, \"cm\" - centimeters, \"m\" - meters (default), \"dm\" - decimeters, \"km\" - kilometers.\n\n## API\n\n[API reference docs.](https://scharkee.github.io/gps-scramble/)\n\nAll gps-scrambler methods return Location objects, which contain coordinates.\n\nThey can be accessed like this:\n\n```js\nconst { Scrambler } = require(\"gps-scramble\");\nlet scrambler = new Scrambler([40.758896, -73.98513]);\nlet location = scrambler.near();\n\nlocation.x; // X coordinate\nlocation.y; // Y coordinate\nlocation[0]; // X coordinate alternative\nlocation[1]; // Y coordinate alternative\n```\n\nThe same method for access works with scramblers themselves. Their initial states can be accessed like so:\n\n```js\nconst { Scrambler } = require(\"gps-scramble\");\nlet scrambler = new Scrambler([40.758896, -73.98513]);\n\nscrambler.x; // initial X coordinate\nscrambler.y; // initial Y coordinate\n// ...\n```\n\n### Support\n\nSubmit bugs and requests through the project's issue tracker:\n\n[![Issues](http://img.shields.io/github/issues/Scharkee/gps-scramble.svg)](https://github.com/Scharkee/gps-scramble/issues)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frastenis%2Fgps-scramble","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frastenis%2Fgps-scramble","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frastenis%2Fgps-scramble/lists"}