satres
Grouping Satellite Bands by Spectral and Spatial Resolution
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (18.3%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
Grouping Satellite Bands by Spectral and Spatial Resolution
Basic Info
- Host: GitHub
- Owner: josesamos
- License: other
- Language: R
- Default Branch: main
- Homepage: https://josesamos.github.io/satres/
- Size: 7.52 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 3
Created over 2 years ago
· Last pushed over 1 year ago
Metadata Files
Readme
Changelog
License
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# satres
[](https://CRAN.R-project.org/package=satres)
[](https://github.com/josesamos/satres/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/josesamos/satres?branch=main)
[](https://cran.r-project.org/package=satres)
We frequently download files with satellite bands from the [*ESA*](https://dataspace.copernicus.eu/) and [*USGS*](https://glovis.usgs.gov/) websites to perform data analysis, transform them or store them in DBMS. They are downloaded as files in ZIP or TAR format. In some cases, it is necessary to download several files that cover the study area, so the first operation to perform is to merge the bands. To access the bands we have to explicitly indicate the name and location of their files.
The goal of `satres` (*sat*ellite spectral and spatial *res*olution) is to partially automate these operations. It is enough to indicate the folder that contains the decompressed files: Satellite bands are automatically obtained by name (spectral) and spatial resolution; if we have several files to cover a geographical area, the corresponding bands are automatically merged. The result can be stored on disk and can also be obtained as objects of class `SpatRaster`, from package [`terra`](https://CRAN.R-project.org/package=terra).
Currently supports files obtained from the following sources and characteristics:
- *Landsat 8-9 OLI/TIRS C2 L1* (Landsat 8-9 Operational Land Imager and Thermal Infrared Sensor Collection 2 Level-1).
- *Landsat 7 ETM+ C2 L1* (Landsat 7 Enhanced Thematic Mapper Plus Collection 2 Level-1).
- *Landsat 4-5 TM C2 L1* (Landsat 4-5 Thematic Mapper Collection 2 Level-1).
- *Sentinel-2 MSI S2MSI1C* (Sentinel-2 Multi Spectral Instrument Level-1C).
- *Sentinel-2 MSI S2MSI2A* (Sentinel-2 Multi Spectral Instrument Level-2A).
## Installation
You can install the released version of `satres` from [CRAN](https://CRAN.R-project.org) with:
``` r
install.packages("satres")
```
And the development version from [GitHub](https://github.com/) with:
``` r
devtools::install_github("josesamos/satres")
```
## Example
```{r, echo = FALSE}
library(satres)
```
To cover the area of the municipality of Lanjarón in Granada (Spain), we have downloaded two satellite band files from the [*ESA*](https://dataspace.copernicus.eu/) website.
- `S2A_MSIL2A_20230905T105621_N0509_R094_T30SVF_20230905T170700.zip`: 0.91 GB
- `S2A_MSIL2A_20230905T105621_N0509_R094_T30SVG_20230905T170700.zip`: 1.14 GB
We have unzipped them directly into a folder, creating two subfolders. Additionally, we have selected and transformed the original raster files, grouping them using the `terra::aggregate()` function with a factor of 100, to reduce their size so they can be included in the package. The result is the following folders:
- `esa/f`: 751 KB
- `esa/g`: 842 KB
To merge the satellite bands corresponding to the same geographical area (tiles) and classify them according to their spatial resolution, we only have to create an object of the `satres` class. We pass as a parameter the folder where the files are located.
```{r}
esa <- system.file("extdata", "esa", package = "satres")
sr <- satres(dir = esa)
```
Next we consult the spatial resolution of the result (remember that we have changed the resolution, adding it by a factor of 100).
```{r}
sr |>
get_spatial_resolution()
```
We obtain an object of class `SpatRaster` from the `terra` package with all the bands of the indicated spatial resolution.
```{r}
b <- sr |>
as_SpatRaster("r1000m")
```
To show the available bands, we represent them graphically below.
```{r bands}
terra::plot(b)
```
The bands are directly accessible by name (*B02*, *B03*, *B04* and *B08* in the figure), within each object obtained in the result.
Owner
- Name: José Samos
- Login: josesamos
- Kind: user
- Location: Granada
- Company: Universidad de Granada
- Website: https://lsi.ugr.es/lsi/jsamos
- Repositories: 1
- Profile: https://github.com/josesamos
R / GIS / Geocomputation / DW / OLAP / Multidimensional Systems
GitHub Events
Total
- Push event: 7
Last Year
- Push event: 7
Packages
- Total packages: 1
-
Total downloads:
- cran 108 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 3
- Total maintainers: 1
cran.r-project.org: satres
Grouping Satellite Bands by Spectral and Spatial Resolution
- Homepage: https://josesamos.github.io/satres/
- Documentation: http://cran.r-project.org/web/packages/satres/satres.pdf
- License: MIT + file LICENSE
-
Latest release: 1.1.1
published over 2 years ago
Rankings
Dependent packages count: 27.9%
Dependent repos count: 36.8%
Average: 50.3%
Downloads: 86.1%
Maintainers (1)
Last synced:
10 months ago
Dependencies
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml
actions
- JamesIves/github-pages-deploy-action v4.4.1 composite
- actions/checkout v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pr-commands.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/pr-fetch v2 composite
- r-lib/actions/pr-push v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml
actions
- actions/checkout v3 composite
- actions/upload-artifact v3 composite
- codecov/codecov-action v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION
cran
- R >= 2.10 depends
- sf * imports
- snakecase * imports
- terra * imports
- utils * imports
- knitr * suggests
- rmarkdown * suggests
- testthat >= 3.0.0 suggests