{"id":16126910,"url":"https://github.com/mikolalysenko/robust-point-in-polygon","last_synced_at":"2025-04-04T11:16:51.472Z","repository":{"id":15491701,"uuid":"18225494","full_name":"mikolalysenko/robust-point-in-polygon","owner":"mikolalysenko","description":"Exactly test if a point is inside, outside or on the boundary of a polygon","archived":false,"fork":false,"pushed_at":"2023-02-03T06:19:40.000Z","size":138,"stargazers_count":245,"open_issues_count":7,"forks_count":28,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-12-16T22:35:35.048Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/mikolalysenko.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":"2014-03-28T20:26:00.000Z","updated_at":"2024-12-15T18:56:18.000Z","dependencies_parsed_at":"2023-02-18T04:01:21.388Z","dependency_job_id":null,"html_url":"https://github.com/mikolalysenko/robust-point-in-polygon","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/mikolalysenko%2Frobust-point-in-polygon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikolalysenko%2Frobust-point-in-polygon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikolalysenko%2Frobust-point-in-polygon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikolalysenko%2Frobust-point-in-polygon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikolalysenko","download_url":"https://codeload.github.com/mikolalysenko/robust-point-in-polygon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247166171,"owners_count":20894654,"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":[],"created_at":"2024-10-09T21:40:56.070Z","updated_at":"2025-04-04T11:16:51.443Z","avatar_url":"https://github.com/mikolalysenko.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"robust-point-in-polygon\n=======================\nExactly determines if a point is contained in a 2D polygon.\n\n# Example\n\n```javascript\nvar classifyPoint = require(\"robust-point-in-polygon\")\nvar polygon = [ [ 1, 1 ], [ 1, 2 ], [ 2, 2 ], [ 2, 1 ] ]\n\nconsole.log(\n  classifyPoint(polygon, [1.5, 1.5]),\n  classifyPoint(polygon, [1, 2]),\n  classifyPoint(polygom, [100000, 10000]))\n```\n\nOutput:\n\n```\n-1 0 1\n```\n\n# Install\n\n```\nnpm install robust-point-in-polygon\n```\n\n# API\n\n### `require(\"robust-point-in-polygon\")(loop, point)`\nTests if a point is contained in the interior of a simple polygon\n\n* `loop` is an array of vertices for the polygon\n* `point` is a 2D point which is classified against the polygon\n\n**Returns** An integer which determines the position of `point` relative to `polygon`.  This has the following interpretation:\n\n* `-1` if `point` is contained inside `loop`\n* `0` if `point` is on the boundary of `loop`\n* `1` if `point` is outside `loop`\n\n# Credits\n(c) 2014 Mikola Lysenko. MIT License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikolalysenko%2Frobust-point-in-polygon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikolalysenko%2Frobust-point-in-polygon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikolalysenko%2Frobust-point-in-polygon/lists"}