MyNixOS website logo
Description

Search and Retrieve Spatial Data from 'GUGiK'.

Automatic open data acquisition from resources of Polish Head Office of Geodesy and Cartography ('Główny Urząd Geodezji i Kartografii') (<https://www.gov.pl/web/gugik>). Available datasets include various types of numeric, raster and vector data, such as orthophotomaps, digital elevation models (digital terrain models, digital surface model, point clouds), state register of borders, spatial databases, geometries of cadastral parcels, 3D models of buildings, and more. It is also possible to geocode addresses or objects using the geocodePL_get() function.

rgugik

CRAN R buildstatus codecov License:MIT DOI

rgugik is an R package for downloading open data from resources of Polish Head Office of Geodesy and Cartography including:

It is also possible to geocode addresses or objects using the geocodePL_get() function.

Corresponding functions

FunctionInputDastaset ENDataset PL
ortho_request(), tile_download()geometryOrthophotomapOrtofotomapa
geodb_download()voivodeshipGeneral Geographic DatabaseBaza Danych Obiektów Ogólnogeograficznych
topodb_download()countyTopographic DatabaseBaza Danych Obiektów Topograficznych
emuia_download()communeRegister of Towns, Streets and AddressesEwidencja Miejscowości, Ulic i Adresów
geonames_download()typeState Register of Geographical NamesPaństwowy Rejestr Nazw Geograficznych
borders_get(), borders_download()typeState Register of BordersPaństwowy Rejestr Granic
parcel_get()parcel ID, coordinatesLocation of cadastral parcelsLokalizacja działek katastralnych
models3D_download()county3D models of buildingsModele 3D budynków
DEM_request(), tile_download()geometryDigital elevation modelsCyfrowe modele wysokościowe

There are the additional functions for obtaining digital terrain model:

  • pointDTM_get() for small areas (high resolution grid)
  • pointDTM100_download() for voivodeships areas (low resolution grid)
  • minmaxDTM_get() to find the minimum and maximum elevation (small areas)

The names of administrative units and their IDs are included in these objects:

  • voivodeship_names (16)
  • county_names (380)
  • commune_names (2476)

Installation

You can install the released version from CRAN with:

install.packages("rgugik")

You can install the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("kadyb/rgugik")

Usage

Orthophotomap

  • ortho_request() - returns a data frame with metadata and links to the orthoimages for a given geometry (point, line or polygon)
  • tile_download() - downloads orthoimages based on the data frame obtained using the ortho_request() function
library(rgugik)
library(sf)
library(stars)

polygon_path = system.file("datasets/search_area.gpkg", package = "rgugik")
polygon = read_sf(polygon_path)

req_df = ortho_request(polygon)

# select the oldest image
req_df = req_df[req_df$year == 2001, ]

# print metadata
t(req_df)
#>             23                                                                              
#> sheetID     "N-33-130-D-b-2-3"                                                              
#> year        "2001"                                                                          
#> resolution  "1"                                                                             
#> composition "RGB"                                                                           
#> sensor      "Satellite"                                                                     
#> CRS         "PL-1992"                                                                       
#> date        "2001-01-01"                                                                    
#> isFilled    "TRUE"                                                                          
#> URL         "https://opendata.geoportal.gov.pl/ortofotomapa/41/41_3756_N-33-130-D-b-2-3.tif"
#> filename    "41_3756_N-33-130-D-b-2-3"                                                      
#> seriesID    "41"

# download image
tile_download(req_df)
#> 1/1

img = read_stars("41_3756_N-33-130-D-b-2-3.tif")
plot(st_rgb(img), main = NULL)

Administrative boundaries

library(rgugik)
library(sf)

# get counties from opolskie voivodeship (TERYT 16)
counties = county_names
counties = counties[substr(counties$TERYT, 1, 2) == "16", "TERYT"]
counties_geom = borders_get(TERYT = counties)
plot(st_geometry(counties_geom), main = "Opolskie")

Vignettes

More advanced examples of the practical (step by step) use of this package can be found in the vignettes:

Acknowledgment

Head Office of Geodesy and Cartography in Poland 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 (amended on 16 April 2020).

All datasets can be explored interactively using the Geoportal.

Contribution

Contributions to this package are welcome. The preferred method of contribution is through a GitHub pull request. Feel also free to contact us by creating an issue. More detailed information can be found in the CONTRIBUTING document.

Maintainers and contributors must follow this repository’s CODE OF CONDUCT.

Citation

To cite rgugik in publications, please use the following article:

Dyba, 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

BibTeX version can be obtained with citation("rgugik").

Related projects

If you don’t feel familiar with R, there is a similar QGIS tool in the EnviroSolutions repository.

Metadata

Version

0.4.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows