{"id":26264275,"url":"https://github.com/paleolimbot/qgisprocess","last_synced_at":"2025-03-14T02:01:54.002Z","repository":{"id":37534432,"uuid":"300634335","full_name":"r-spatial/qgisprocess","owner":"r-spatial","description":"R package to use QGIS processing algorithms","archived":false,"fork":false,"pushed_at":"2024-05-20T15:42:58.000Z","size":17580,"stargazers_count":196,"open_issues_count":5,"forks_count":21,"subscribers_count":17,"default_branch":"main","last_synced_at":"2024-06-11T18:32:44.153Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://r-spatial.github.io/qgisprocess/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/r-spatial.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-02T14:07:24.000Z","updated_at":"2024-06-26T23:56:03.662Z","dependencies_parsed_at":"2024-02-26T11:51:17.156Z","dependency_job_id":"fc5d03cc-775c-4939-a175-7ecc18fd2d3c","html_url":"https://github.com/r-spatial/qgisprocess","commit_stats":null,"previous_names":["paleolimbot/qgisprocess"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-spatial%2Fqgisprocess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-spatial%2Fqgisprocess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-spatial%2Fqgisprocess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-spatial%2Fqgisprocess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r-spatial","download_url":"https://codeload.github.com/r-spatial/qgisprocess/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243510117,"owners_count":20302294,"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":"2025-03-14T02:01:53.042Z","updated_at":"2025-03-14T02:01:53.993Z","avatar_url":"https://github.com/r-spatial.png","language":"R","funding_links":[],"categories":["R"],"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  dpi = 300\n)\n```\n\n# qgisprocess\n\n\u003cimg src=\"man/figures/qgisprocess.svg\" align=\"right\" hspace=\"10\" vspace=\"0\" width=\"20%\"\u003e\n\n\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/qgisprocess)](https://CRAN.R-project.org/package=qgisprocess)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8260794.svg)](https://doi.org/10.5281/zenodo.8260794)\n[![R-CMD-check](https://github.com/r-spatial/qgisprocess/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-spatial/qgisprocess/actions/workflows/R-CMD-check.yaml)\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)\n[![Codecov test coverage](https://codecov.io/gh/r-spatial/qgisprocess/branch/main/graph/badge.svg)](https://app.codecov.io/gh/r-spatial/qgisprocess/tree/main)\n\u003c!-- badges: end --\u003e\n\nThe goal of **qgisprocess** is to provide an R interface to the geoprocessing algorithms of [QGIS](https://qgis.org), a popular and open source desktop geographic information system (GIS) program.\nThe package is a re-implementation of functionality provided by the archived [RQGIS](https://cran.r-project.org/package=RQGIS) package, which was partially revived in the [RQGIS3](https://github.com/r-spatial/RQGIS3) package.\n\n## Installation\n\n### qgisprocess\n\nTo install the latest CRAN release, just run:\n\n```{r eval=FALSE}\ninstall.packages(\"qgisprocess\")\n```\n\nYou can install the development version from GitHub with:\n\n```{r eval=FALSE}\n# install.packages(\"remotes\")\nremotes::install_github(\"r-spatial/qgisprocess\")\n```\n\n### QGIS\n\nThe **qgisprocess** package wraps the [standalone `qgis_process` command-line utility](https://docs.qgis.org/latest/en/docs/user_manual/processing/standalone.html), which is available in QGIS \u003e= 3.16.\n\nThe package is meant to support _current_ QGIS releases, i.e. both the latest and the long-term release.\nAlthough older QGIS releases are not officially supported, it may work since QGIS 3.16.\nInstallation instructions for all platforms are available at \u003chttps://download.qgis.org/\u003e.\n\nIf a recent version of QGIS isn't available for your OS, you can use the [Geocomputation with R Docker image](https://github.com/geocompx/docker/pkgs/container/docker) with QGIS installed (`docker pull ghcr.io/geocompx/docker:qgis`).\nSee the vignette on 'getting started' for more information.\n\n### Package configuration\n\nIf the automatic configuration fails (or if you have more than one QGIS installation and would like to choose which one is used), you can set `options(qgisprocess.path = \"path/to/qgis_process\")`.\nSpecify the `qgisprocess.path` option in your `.Rprofile`, to make your choices persistent between sessions.\nYou can run `qgis_configure()` to reconfigure the package, or just `qgis_configure(use_cached_data = TRUE)` to see the gritty details!\n\n```{r}\nlibrary(qgisprocess)\n```\n\n## Functionality\n\nMost functions start with the `qgis_` prefix, so that functions can be found more easily using tab completion.\n\nThe main function is `qgis_run_algorithm(algorithm = , ...)`.\nIt specifies the geoprocessing algorithm to be called with a `\"provider:algorithm\"` formatted identifier, e.g. `\"native:convexhull\"` or `\"gdal:hillshade\"`, and it passes the algorithm arguments as R function arguments.\n\nAdditional functions are provided to discover available geoprocessing algorithms, retrieve their documentation, handle processing results, manage QGIS plugins, and more.\n\nSpatial layers can be passed to `qgis_run_algorithm()` as file paths but also as [sf](https://r-spatial.github.io/sf/), [stars](https://r-spatial.github.io/stars/), [terra](https://rspatial.github.io/terra/) or [raster](https://cran.r-project.org/package=raster) objects.\n\nA structured overview of functions is available at \u003chttps://r-spatial.github.io/qgisprocess/reference/index.html\u003e.\nTo get started, read the 'getting started' vignette and use the [cheat sheets](https://r-spatial.github.io/qgisprocess/articles/)!\n\nNote that R package [**qgis**](https://github.com/JanCaha/r_package_qgis) extends on **qgisprocess** by providing a separate R function for each geoprocessing algorithm.\nIn addition, it makes the QGIS algorithm documentation available in the corresponding R function documentation.\n\n### Example\n\nThe following example demonstrates the [buffer](https://docs.qgis.org/latest/en/docs/user_manual/processing_algs/qgis/vectorgeometry.html#buffer) algorithm in action.\n\n```{r buffer, out.width='60%'}\ninput \u003c- sf::read_sf(system.file(\"shape/nc.shp\", package = \"sf\"))\n\nresult \u003c- qgis_run_algorithm(\n  \"native:buffer\",\n  INPUT = input,\n  DISTANCE = 1,\n  DISSOLVE = TRUE\n)\n\nresult\n\noutput_sf \u003c- sf::st_as_sf(result)\nplot(sf::st_geometry(output_sf))\n```\n\n### Some tips\n\nYou can search for algorithms with `qgis_search_algorithms()` (string matching with regex).\n\n```{r}\nqgis_search_algorithms(algorithm = \"buffer\", group = \"[Vv]ector\")\n```\n\nYou can read the help associated with an algorithm using `qgis_show_help()`.\n\n```{r eval=FALSE}\nqgis_show_help(\"native:buffer\")\n```\n\nA full list of available algorithms is returned by `qgis_algorithms()`.\n\n```{r}\nqgis_algorithms()\n```\n\nIt may also be useful to run an algorithm in the QGIS GUI to determine how the various input values are translated to string processing arguments.\nThis can be done using the 'Advanced' dropdown, by copying either the `qgis_process` command string or the JSON string:\n\n![](man/figures/copy_as_json.png)\n\nNote that the JSON string can be passed directly to `qgis_run_algorithm()`!\n\n## Code of Conduct\n\nPlease note that the qgisprocess project is released with a [Contributor Code of Conduct](https://r-spatial.github.io/qgisprocess/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.\n\n## More information\n\n### Presentations\n\n- useR! 2024: [slides](https://florisvdh.github.io/user-2024-qgisprocess/)\n- FOSS4G 2023: [slides](https://florisvdh.github.io/foss4g-2023-qgisprocess/) \u0026 [video](https://www.youtube.com/watch?v=Qt5DzWThWqI)\n- FOSS4G 2021: [slides](https://dewey.dunnington.ca/slides/qgisprocess2021/) \u0026 [video](https://www.youtube.com/watch?v=iA0OQ2Icn6Y\u0026t=1912s)\n\n### In the wild\n\n(Draft)\n\nFollowing case studies have used the package:\n\n- \\\u003cReference to your work\\\u003e. Source code: \\\u003cURL\\\u003e.\n\n_If you used the package in your work and would like to see it referenced here, then give a shout in issue [#211](https://github.com/r-spatial/qgisprocess/issues/211) or make a pull request!_\n\n### Further reading\n\n- A [paper](https://journal.r-project.org/archive/2017/RJ-2017-067/index.html) on the original RQGIS package published in the R Journal\n- A [discussion](https://github.com/r-spatial/discuss/issues/41) about options for running QGIS from R that led to this package\n- The [pull request](https://github.com/qgis/QGIS/pull/34617) in the QGIS repo that led to the development of the `qgis_process` command-line utility\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaleolimbot%2Fqgisprocess","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaleolimbot%2Fqgisprocess","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaleolimbot%2Fqgisprocess/lists"}