### Installation from CRAN Source: https://github.com/kadyb/rgugik/blob/master/README.md Installs the released version of the rgugik package from CRAN. ```r install.packages("rgugik") ``` -------------------------------- ### Installation from GitHub Source: https://github.com/kadyb/rgugik/blob/master/README.md Installs the development version of the rgugik package from GitHub. ```r # install.packages("remotes") remotes::install_github("kadyb/rgugik") ``` -------------------------------- ### Orthophotomap Usage Example Source: https://github.com/kadyb/rgugik/blob/master/README.md Demonstrates how to use the rgugik package to download orthophotomap data. It involves reading a polygon, requesting orthoimages for that polygon, and then filtering for a specific year. ```r 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, ] ``` -------------------------------- ### Cloning the repository and setting up upstream Source: https://github.com/kadyb/rgugik/blob/master/CONTRIBUTING.md Steps to clone the repository and configure upstream remote for tracking changes. ```bash git clone https://github.com/kadyb/rgugik.git git remote add upstream https://github.com/kadyb/rgugik.git git fetch upstream git pull upstream ``` -------------------------------- ### Download image Source: https://github.com/kadyb/rgugik/blob/master/README.md This snippet demonstrates how to download an image and then read and plot it using the 'stars' package. ```r # 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) ``` -------------------------------- ### Print metadata Source: https://github.com/kadyb/rgugik/blob/master/README.md This snippet shows how to print metadata for a given request dataframe. ```r # print metadata t(req_df) #> 31 #> 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" ``` -------------------------------- ### Administrative boundaries Source: https://github.com/kadyb/rgugik/blob/master/README.md This snippet shows how to retrieve and plot administrative boundaries for a specific voivodeship (Opolskie in this case). ```r 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") ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.