{"id":26325177,"url":"https://github.com/kadyb/rgugik","last_synced_at":"2025-04-09T18:23:28.321Z","repository":{"id":39133274,"uuid":"279318804","full_name":"kadyb/rgugik","owner":"kadyb","description":"Download datasets from Polish Head Office of Geodesy and Cartography","archived":false,"fork":false,"pushed_at":"2025-03-09T15:12:18.000Z","size":7669,"stargazers_count":33,"open_issues_count":9,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-02T17:04:32.982Z","etag":null,"topics":["cartography","geodesy","gis","open-data","poland","r"],"latest_commit_sha":null,"homepage":"https://kadyb.github.io/rgugik/","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/kadyb.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":"CONTRIBUTING.md","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-07-13T14:02:16.000Z","updated_at":"2025-03-22T08:13:51.000Z","dependencies_parsed_at":"2024-01-02T21:37:44.470Z","dependency_job_id":"b2be8224-01c1-4865-8bd0-a0caea593e63","html_url":"https://github.com/kadyb/rgugik","commit_stats":{"total_commits":522,"total_committers":5,"mean_commits":104.4,"dds":0.2068965517241379,"last_synced_commit":"6c7c276c6b4fc3bdb2c1df5bac35126c3a65a017"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadyb%2Frgugik","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadyb%2Frgugik/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadyb%2Frgugik/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadyb%2Frgugik/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kadyb","download_url":"https://codeload.github.com/kadyb/rgugik/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248086045,"owners_count":21045261,"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":["cartography","geodesy","gis","open-data","poland","r"],"created_at":"2025-03-15T18:31:34.998Z","updated_at":"2025-04-09T18:23:28.299Z","avatar_url":"https://github.com/kadyb.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# rgugik \u003cimg src=\"man/figures/logo.png\" align=\"right\" width=\"150\"/\u003e\n\n\u003c!-- badges: start --\u003e\n[![CRAN](https://www.r-pkg.org/badges/version/rgugik)](https://cran.r-project.org/package=rgugik)\n[![R build status](https://github.com/kadyb/rgugik/workflows/rcmdcheck/badge.svg)](https://github.com/kadyb/rgugik/actions)\n[![codecov](https://codecov.io/gh/kadyb/rgugik/branch/master/graph/badge.svg)](https://app.codecov.io/gh/kadyb/rgugik)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/license/mit)\n[![DOI](https://joss.theoj.org/papers/10.21105/joss.02948/status.svg)](https://doi.org/10.21105/joss.02948)\n\u003c!-- badges: end --\u003e\n\n**rgugik** is an R package for downloading open data from resources of [Polish Head Office of Geodesy and Cartography](https://www.gov.pl/web/gugik) including:\n\n  - [Orthophotomaps](https://www.geoportal.gov.pl/pl/dane/ortofotomapa-orto/)\n  - [General Geographic Database](https://www.geoportal.gov.pl/pl/dane/baza-danych-obiektow-ogolnogeograficznych-bdoo/)\n  - [Topographic Database](https://www.geoportal.gov.pl/pl/dane/baza-danych-obiektow-topograficznych-bdot10k/)\n  - [Register of Towns, Streets and Addresses](https://emuia.gugik.gov.pl)\n  - [State Register of Geographical Names](https://www.geoportal.gov.pl/pl/dane/panstwowy-rejestr-nazw-geograficznych-prng/)\n  - [State Register of Borders](https://www.geoportal.gov.pl/pl/dane/panstwowy-rejestr-granic-prg/)\n  - [Land and Building Registers](https://www.geoportal.gov.pl/pl/dane/ewidencja-gruntow-i-budynkow-egib/)\n  - Location (geometry) of cadastral parcels using TERYT (parcel ID) or coordinates\n  - 3D models of buildings (LOD1, LOD2)\n  - Various digital elevation models as:\n    - [Digital terrain model](https://www.geoportal.gov.pl/pl/dane/numeryczny-model-terenu-nmt/)\n    - [Digital surface model](https://www.geoportal.gov.pl/pl/dane/numeryczny-model-pokrycia-terenu-nmpt/)\n    - [Point cloud](https://www.geoportal.gov.pl/pl/dane/dane-pomiarowe-lidar-lidar/)\n\nIt is also possible to geocode addresses or objects using the `geocodePL_get()` function.\n\n**Corresponding functions**\n\n```{r echo=FALSE}\nds_pl = c(\"Ortofotomapa\",\n          \"Baza Danych Obiektów Ogólnogeograficznych\",\n          \"Baza Danych Obiektów Topograficznych\",\n          \"Ewidencja Miejscowości, Ulic i Adresów\",\n          \"Ewidencja Gruntów i Budynków\",\n          \"Państwowy Rejestr Nazw Geograficznych\",\n          \"Państwowy Rejestr Granic\",\n          \"Lokalizacja działek katastralnych\",\n          \"Modele 3D budynków\",\n          \"Cyfrowe modele wysokościowe\")\n\nds_en = c(\"Orthophotomap\",\n          \"General Geographic Database\",\n          \"Topographic Database\",\n          \"Register of Towns, Streets and Addresses\",\n          \"Land and Building Register\",\n          \"State Register of Geographical Names\",\n          \"State Register of Borders\",\n          \"Location of cadastral parcels\",\n          \"3D models of buildings\",\n          \"Digital elevation models\")\n\nfun = c(\"`ortho_request()`, `tile_download()`\",\n        \"`geodb_download()`\",\n        \"`topodb_download()`\",\n        \"`emuia_download()`\",\n        \"`egib_download()`\",\n        \"`geonames_download()`\",\n        \"`borders_get()`, `borders_download()`\",\n        \"`parcel_get()`\",\n        \"`models3D_download()`\",\n        \"`DEM_request()`, `tile_download()`\")\n\ninput = c(\"geometry\",\n          \"voivodeship\",\n          \"county\",\n          \"commune\",\n          \"county\",\n          \"type\",\n          \"type\",\n          \"parcel ID, coordinates\",\n          \"county\",\n          \"geometry\")\n\ndf = data.frame(fun, input, ds_en, ds_pl)\ncolnames(df) = c(\"Function\", \"Input\", \"Dastaset EN\", \"Dataset PL\")\n\nknitr::kable(df)\n```\n\nThere are the additional functions for obtaining digital terrain model:\n\n  - `pointDTM_get()` for small areas (high resolution grid)\n  - `pointDTM100_download()` for voivodeships areas (low resolution grid)\n  - `minmaxDTM_get()` to find the minimum and maximum elevation (small areas)\n\nThe names of administrative units and their IDs are included in these objects:\n\n  - `voivodeship_names` (16)\n  - `county_names` (380)\n  - `commune_names` (2476)\n\n## Installation\n\nYou can install the released version from [CRAN](https://cran.r-project.org/) with:\n\n```{r eval=FALSE}\ninstall.packages(\"rgugik\")\n```\n\nYou can install the development version from [GitHub](https://github.com) with:\n\n```{r message=FALSE, warning=FALSE, eval=FALSE}\n# install.packages(\"remotes\")\nremotes::install_github(\"kadyb/rgugik\")\n```\n\n## Usage\n\n### Orthophotomap\n  \n- `ortho_request()` - returns a data frame with metadata and links to the orthoimages for a given geometry (point, line or polygon)\n- `tile_download()` - downloads orthoimages based on the data frame obtained using the `ortho_request()` function\n  \n```{r f1, message=FALSE, warning=FALSE}\nlibrary(rgugik)\nlibrary(sf)\nlibrary(stars)\n\npolygon_path = system.file(\"datasets/search_area.gpkg\", package = \"rgugik\")\npolygon = read_sf(polygon_path)\n\nreq_df = ortho_request(polygon)\n\n# select the oldest image\nreq_df = req_df[req_df$year == 2001, ]\n\n# print metadata\nt(req_df)\n\n# download image\ntile_download(req_df)\n\nimg = read_stars(\"41_3756_N-33-130-D-b-2-3.tif\")\nplot(st_rgb(img), main = NULL)\n```\n\n```{r echo=FALSE, message=FALSE}\ninvisible(file.remove(\"41_3756_N-33-130-D-b-2-3.tif\"))\n```\n\n### Administrative boundaries\n\n```{r f2}\nlibrary(rgugik)\nlibrary(sf)\n\n# get counties from opolskie voivodeship (TERYT 16)\ncounties = county_names\ncounties = counties[substr(counties$TERYT, 1, 2) == \"16\", \"TERYT\"]\ncounties_geom = borders_get(TERYT = counties)\nplot(st_geometry(counties_geom), main = \"Opolskie\")\n```\n\n### Vignettes\n\nMore advanced examples of the practical (step by step) use of this package can be found in the vignettes:\n\n- [Orthophotomap](https://kadyb.github.io/rgugik/articles/orthophotomap.html)\n- [Digital elevation model](https://kadyb.github.io/rgugik/articles/DEM.html)\n- [Topographic Database](https://kadyb.github.io/rgugik/articles/topodb.html)\n\n## Acknowledgment\n\n[Head Office of Geodesy and Cartography in Poland](https://www.gov.pl/web/gugik) is the main source of the provided data. The data is made available in accordance with the [Act of May 17, 1989 Geodetic and Cartographic Law](https://isap.sejm.gov.pl/isap.nsf/DocDetails.xsp?id=WDU19890300163) (amended on 16 April 2020).\n\nAll datasets can be explored interactively using the [Geoportal](https://mapy.geoportal.gov.pl).\n\n## Contribution\n\nContributions to this package are welcome. \nThe preferred method of contribution is through a GitHub pull request. \nFeel also free to contact us by creating [an issue](https://github.com/kadyb/rgugik/issues).\nMore detailed information can be found in the [CONTRIBUTING](https://github.com/kadyb/rgugik/blob/master/CONTRIBUTING.md) document.\n\nMaintainers and contributors must follow this repository’s [CODE OF CONDUCT](https://github.com/kadyb/rgugik/blob/master/CODE_OF_CONDUCT.md).\n\n## Citation\n\nTo cite **rgugik** in publications, please use the following [article](https://doi.org/10.21105/joss.02948):\n\n```\nDyba, K. and Nowosad, J. (2021). rgugik: Search and Retrieve Spatial Data from the Polish Head Office of Geodesy and Cartography in R. Journal of Open Source Software, 6(59), 2948, https://doi.org/10.21105/joss.02948\n```\n\nBibTeX version can be obtained with `citation(\"rgugik\")`.\n\n## Related projects\n\nIf you don't feel familiar with R, there is a similar [QGIS](https://www.qgis.org/) tool in the [EnviroSolutions](https://github.com/envirosolutionspl) repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkadyb%2Frgugik","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkadyb%2Frgugik","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkadyb%2Frgugik/lists"}