{"id":18722613,"url":"https://github.com/mdsumner/mbr","last_synced_at":"2025-04-12T14:53:08.124Z","repository":{"id":72211573,"uuid":"302875548","full_name":"mdsumner/mbr","owner":"mdsumner","description":"Compute the Minimum Bounding Rectangle","archived":false,"fork":false,"pushed_at":"2020-10-10T10:52:44.000Z","size":189,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T09:22:04.155Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://mdsumner.github.io/mbr/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdsumner.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2020-10-10T10:25:16.000Z","updated_at":"2022-02-17T01:18:36.000Z","dependencies_parsed_at":"2024-01-15T09:06:12.846Z","dependency_job_id":null,"html_url":"https://github.com/mdsumner/mbr","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/mdsumner%2Fmbr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fmbr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fmbr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fmbr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdsumner","download_url":"https://codeload.github.com/mdsumner/mbr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586227,"owners_count":21128995,"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-11-07T13:42:12.564Z","updated_at":"2025-04-12T14:53:08.119Z","avatar_url":"https://github.com/mdsumner.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# mbr\n\n\u003c!-- badges: start --\u003e\n[![R build status](https://github.com/mdsumner/mbr/workflows/R-CMD-check/badge.svg)](https://github.com/mdsumner/mbr/actions)\n\u003c!-- badges: end --\u003e\n\nThe goal of mbr is to compute the minimum bounding rectangle of a set of points. \n\nProvided as an answer to a question on this site, by Bill Huber on 2012-04-05\n\nhttps://gis.stackexchange.com/questions/22895/finding-minimum-area-rectangle-for-given-points/22934?stw=2#22934\n\nHere is an example of its use:\n\n```{r mbr}  \nlibrary(mbr)\n  # Create sample data\n  set.seed(23)\np \u003c- matrix(rnorm(20*2), ncol=2)                 # Random (normally distributed) points\nmbr \u003c- MBR(p)\n\n# Plot the hull, the MBR, and the points\nlimits \u003c- apply(mbr, 2, range) # Plotting limits\nplot(p[(function(x) c(x, x[1]))(chull(p)), ], \n     type=\"l\", asp=1, bty=\"n\", xaxt=\"n\", yaxt=\"n\",\n     col=\"Gray\", pch=20, \n     xlab=\"\", ylab=\"\",\n     xlim=limits[,1], ylim=limits[,2])                # The hull\nlines(mbr, col=\"Blue\", lwd=3)                         # The MBR\npoints(p, pch=19)    \n\n```\n\n## Installation\n\nYou can install with\n\n``` r\nremotes::install_github(\"mdsumner/mbr\"\n```\n\n\n## sf\n\nFor an sf wrapper see https://github.com/mdsumner/mbr/issues/1\n\n## Code of Conduct\n  \nPlease note that the mbr project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdsumner%2Fmbr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdsumner%2Fmbr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdsumner%2Fmbr/lists"}