{"id":50464395,"url":"https://github.com/atsyplenkov/geosx","last_synced_at":"2026-06-01T06:31:49.132Z","repository":{"id":316534378,"uuid":"1063778647","full_name":"atsyplenkov/geosx","owner":"atsyplenkov","description":"An extension to geos R package","archived":false,"fork":false,"pushed_at":"2026-03-19T15:00:16.000Z","size":2827,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-20T07:20:09.685Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/atsyplenkov.png","metadata":{"files":{"readme":"README.Rmd","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-25T05:35:28.000Z","updated_at":"2026-03-19T15:03:50.000Z","dependencies_parsed_at":"2025-09-26T01:15:52.356Z","dependency_job_id":null,"html_url":"https://github.com/atsyplenkov/geosx","commit_stats":null,"previous_names":["atsyplenkov/geosx"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/atsyplenkov/geosx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atsyplenkov%2Fgeosx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atsyplenkov%2Fgeosx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atsyplenkov%2Fgeosx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atsyplenkov%2Fgeosx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atsyplenkov","download_url":"https://codeload.github.com/atsyplenkov/geosx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atsyplenkov%2Fgeosx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33763648,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"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":[],"created_at":"2026-06-01T06:31:47.461Z","updated_at":"2026-06-01T06:31:49.084Z","avatar_url":"https://github.com/atsyplenkov.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  dpi = 300,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n\n\u003c!-- badges: start --\u003e\n\n\u003ch1 align=center\u003e\u003ccode\u003egeosx\u003c/code\u003e\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003c!-- \u003ca href=\"https://github.com/atsyplenkov/geosx/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/atsyplenkov/geosx?style=flat\u0026labelColor=1C2C2E\u0026color=198ce7\u0026logo=GitHub\u0026logoColor=white\"\u003e\u003c/a\u003e --\u003e\n    \u003c!-- \u003ca href=\"https://cran.r-project.org/package=geosx\"\u003e\n        \u003cimg src=\"https://img.shields.io/cran/v/geosx?style=flat\u0026labelColor=1C2C2E\u0026color=198ce7\u0026logo=R\u0026logoColor=white\"\u003e\u003c/a\u003e --\u003e\n    \u003ca href=\"https://app.codecov.io/gh/atsyplenkov/geosx\"\u003e\u003cimg src=\"https://img.shields.io/codecov/c/gh/atsyplenkov/geosx?style=flat\u0026labelColor=1C2C2E\u0026color=256bc0\u0026logo=Codecov\u0026logoColor=white\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/atsyplenkov/geosx/actions/workflows/R-CMD-check.yaml\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/atsyplenkov/geosx/R-CMD-check.yaml?style=flat\u0026labelColor=1C2C2E\u0026color=256bc0\u0026logo=GitHub%20Actions\u0026logoColor=white\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003c!-- badges: end --\u003e\n\nThe `geosx` package provides a collection of common tools for\nvector geometry operations as an extension to\n[`geos`](https://github.com/paleolimbot/geos). It is a highly\nexperimental and opinionated library, with a focus on performance, \nsimplicity and lightweightness. I originally put this package together for my\nown projects, collecting handy functions I kept reusing.\n\n\u003e [!note]\n\u003e This package is still in development and API is subject to change.\n\n## Installation\n\nYou can install the development version of geosx like so:\n\n```r\n# install.packages(\"pak\")\npak::pak(\"atsyplenkov/geosx\")\n```\n## Examples\n\nFor example, one can generate a grid of polygons over some points and\nfind the points within the central grid cell, or find standalone points\n(those which stand within a user-defined distance from other points):\n```{r example}\nlibrary(geos)\nlibrary(geosx)\n\n# Generate some random points\npts \u003c- wk::xy(\n  x = runif(10000, 0, 100000),\n  y = runif(10000, 0, 100000)\n) |\u003e\n  geos::as_geos_geometry()\n\n# Generate a grid of polygons over the points\ngrid \u003c- geos_make_grid(pts, 5, 5)\n\n# Find the points within the central grid cell\npts_within \u003c- geos_str_intersection(pts, grid[13])\n\n# Or find standalone points (those which stand within `maxdist`)\npts_standalone \u003c- geos_standalone_points(pts, 1000)\n\n# Plot the points and the grid\nplot(pts, col = \"grey\")\nplot(pts_within, add = TRUE, col = \"dodgerblue\", pch = 19)\nplot(pts_standalone, add = TRUE, col = \"forestgreen\", pch = 19)\nplot(grid[13], add = TRUE, border = \"red\", lwd = 3)\n```\n\nThe `geos_str_intersection` function acts similarly to the\n`geos::geos_intersect` (and `sf::st_intersection`), but is\nslightly faster for multiple polygons. However, one may not find\nsignificant speed gain in single polygon cases due to additional type checking\ngoing under the hood in `geosx`.\n\n```{r benchmark1}\nlibrary(bench)\nlibrary(sf)\n\npts_sf \u003c- sf::st_as_sfc(pts)\ngrid_sf \u003c- sf::st_as_sfc(grid)\n\n# Single polygon\nbench::mark(\n  geosx = geos_str_intersection(pts, grid[13]),\n  geos = pts[geos::geos_intersects(pts, grid[13])],\n  sf = sf::st_intersects(pts_sf, grid_sf[13]),\n  iterations = 30L,\n  check = FALSE\n)\n\n# Multiple polygons\nbench::mark(\n  geosx = geos_str_intersection(pts, grid[13:15]),\n  geos = pts[geos::geos_intersects(\n    pts,\n    geos::geos_make_collection(grid[13:15])\n  )],\n  sf = sf::st_intersects(pts_sf, grid_sf[13:15]),\n  iterations = 30L,\n  check = FALSE\n)\n```\n\nAnd my favourite tool is the `geos_clip` function, which clips a geometry to a polygon. \n\n```{r benchmark2}\nbench::mark(\n  geosx = geos_clip(pts, grid[13]),\n  sf = sf::st_intersection(pts_sf, grid_sf[13]),\n  iterations = 30L,\n  check = FALSE\n)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatsyplenkov%2Fgeosx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatsyplenkov%2Fgeosx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatsyplenkov%2Fgeosx/lists"}