{"id":15406458,"url":"https://github.com/odlp/simplify_rb","last_synced_at":"2025-07-31T12:39:28.486Z","repository":{"id":19010225,"uuid":"22232982","full_name":"odlp/simplify_rb","owner":"odlp","description":"Polyline simplification library. Ruby port of Simplify.js.","archived":false,"fork":false,"pushed_at":"2021-02-11T13:01:03.000Z","size":33,"stargazers_count":36,"open_issues_count":0,"forks_count":14,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-21T18:47:52.142Z","etag":null,"topics":["polygon","polyline","polyline-simplification"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/odlp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-24T21:56:19.000Z","updated_at":"2024-09-13T14:34:10.000Z","dependencies_parsed_at":"2022-08-28T12:01:30.717Z","dependency_job_id":null,"html_url":"https://github.com/odlp/simplify_rb","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/odlp/simplify_rb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odlp%2Fsimplify_rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odlp%2Fsimplify_rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odlp%2Fsimplify_rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odlp%2Fsimplify_rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/odlp","download_url":"https://codeload.github.com/odlp/simplify_rb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odlp%2Fsimplify_rb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268040182,"owners_count":24185845,"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","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["polygon","polyline","polyline-simplification"],"created_at":"2024-10-01T16:23:03.471Z","updated_at":"2025-07-31T12:39:28.454Z","avatar_url":"https://github.com/odlp.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimplifyRb - Polyline simplification\n\n[![Build Status](https://circleci.com/gh/odlp/simplify_rb.svg?style=shield)](https://circleci.com/gh/odlp/simplify_rb) [![Gem Version](https://badge.fury.io/rb/simplify_rb.svg)](https://badge.fury.io/rb/simplify_rb)\n\nSimplifyRb is a Ruby port of [simplify.js](https://github.com/mourner/simplify-js) by Vladimir Agafonkin.\n\nYou can use this gem to reduce the number of points in a complex polyline / polygon, making use of an optimized Douglas-Peucker algorithm.\n\n## Usage\n\n```ruby\nrequire 'simplify_rb'\n\npoints = [\n  { x: 51.5256, y: -0.0875 },\n  { x: 51.7823, y: -0.0912 }\n]\ntolerance = 1\nhigh_quality = true\n\nSimplifyRb::Simplifier.new.process(points, tolerance, high_quality)\n```\n\n```points```: An array of hashes, containing x,y coordinates.\n\n```tolerance```: (optional, 1 by default): Affects the amount of simplification that occurs (the smaller, the less simplification).\n\n```high_quality```: (optional, False by default): Flag to exclude the distance pre-processing. Produces higher quality results when true is passed, but runs slower.\n\n### Custom points\n\nYou can also use custom points, such as a struct or object which responds to `:x` and `:y`, rather than hashes:\n\n```ruby\nCustomPointStruct = Struct.new(:x, :y)\n\ncustom_points = [\n  CustomPointStruct.new(51.5256, -0.0875),\n  CustomPointStruct.new(51.7823, -0.0912)\n]\n\ntolerance = 1\nhigh_quality = true\n\nSimplifyRb::Simplifier.new.process(custom_points, tolerance, high_quality)\n```\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'simplify_rb'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install simplify_rb\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodlp%2Fsimplify_rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fodlp%2Fsimplify_rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodlp%2Fsimplify_rb/lists"}