{"id":22092192,"url":"https://github.com/pirxpilot/vis-why","last_synced_at":"2025-07-24T20:32:06.399Z","repository":{"id":19152539,"uuid":"22383236","full_name":"pirxpilot/vis-why","owner":"pirxpilot","description":"M Visvalingam and J D Whyatt line simplification algorithm","archived":false,"fork":false,"pushed_at":"2024-02-07T11:47:31.000Z","size":134,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-11-20T03:39:04.894Z","etag":null,"topics":["polyline"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/pirxpilot.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","contributing":null,"funding":null,"license":null,"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":"2014-07-29T14:41:52.000Z","updated_at":"2024-02-07T11:33:32.000Z","dependencies_parsed_at":"2024-10-23T07:22:47.409Z","dependency_job_id":"bc24bfe8-0d3c-4e1d-9a05-edc7993a9681","html_url":"https://github.com/pirxpilot/vis-why","commit_stats":{"total_commits":52,"total_committers":4,"mean_commits":13.0,"dds":0.25,"last_synced_commit":"d4da23dd16682978173d6d59c093e8eeeb8af70c"},"previous_names":["code42day/vis-why"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fvis-why","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fvis-why/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fvis-why/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fvis-why/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pirxpilot","download_url":"https://codeload.github.com/pirxpilot/vis-why/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227476143,"owners_count":17779417,"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":["polyline"],"created_at":"2024-12-01T03:08:36.895Z","updated_at":"2024-12-01T03:08:38.836Z","avatar_url":"https://github.com/pirxpilot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NPM version][npm-image]][npm-url]\n[![Build Status][build-image]][build-url]\n[![Dependency Status][deps-image]][deps-url]\n\n# vis-why\n\n  M Visvalingam and J D Whyatt line simplification algorithm\n  Implementation based on [Mike Bostock's code](http://bost.ocks.org/mike/simplify/) but without a d3 dependency.\n\n  Live demo is [here](http://pirxpilot.github.io/vis-why/)\n\n## Installation\n\n  Install with [npm]:\n\n    $ npm install vis-why\n\n## API\n\n### `simplify(polyline, limit)`\n\nSimplify polyline by [repeated elimination of the smallest][vis-why] area.\n\n- `polyline` - array of points representing a polyline, each point represented by coordinate array `[x, y]`\n- `limit` - number of points/vortexes that will remain in the resulting polyline\n\n\n### `simplify(polyline, limit, areaFn)`\n\nYou can specify a custom `areaFn` if your points are not represented by `[x, y]` pair. For example if you have\nan array of `{x, y}` objects you can use something like this:\n\n```js\n\nfunction area(a, b, c) {\n  return Math.abs(\n    (a.x - c.x) * (b.y - a.y) - (a.x - b.x) * (c.y - a.y)\n  );\n}\n\nsimplify(poly, 4, area);\n\n```\n\n## License\n\n  The MIT License (MIT)\n\n  Copyright (c) 2014\n\n[npm]: https://www.npmjs.org/\n[vis-why]: https://hydra.hull.ac.uk/resources/hull:8338\n\n[npm-image]: https://img.shields.io/npm/v/vis-why\n[npm-url]: https://npmjs.org/package/vis-why\n\n[build-url]: https://github.com/pirxpilot/vis-why/actions/workflows/check.yaml\n[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/vis-why/check.yaml?branch=main\n\n[deps-image]: https://img.shields.io/librariesio/release/npm/vis-why\n[deps-url]: https://libraries.io/npm/vis-why\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpirxpilot%2Fvis-why","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpirxpilot%2Fvis-why","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpirxpilot%2Fvis-why/lists"}