spaRtially: A small blog about spatial processing in ‘R’

# Posts

Featured on R-bloggers and rweekly

### MODIStsp v. 1.4.0 is out !

A new version of MODIStsp (1.4.0) is on CRAN as of today !

This version:

• Switches to use of GDAL3/PROJ6 WKTs for projection representation, using sf::gdal_utils to perform gdalwarp/gdaltranslate instead of gdalUtils on external GDAL;

• Switches to use of sf for all internal work on vector data;

• Removes sp, rgdal, rgeos, pacman, gdalUtils dependencies;

• Adds support for products MCD19A1 and MCD19A2 products.

### MODIStsp v. 1.3.9 is out !

A new version of MODIStsp (1.3.9) is on CRAN as of today !

This version:

### MODIStsp v. 1.3.8 is out !

A new version of MODIStsp (1.3.8) is on CRAN as of today ! The new version fixes a nasty issue introduced by changes in gdal_buildvrt behaviour in GDAL > 2.3, (https://trac.osgeo.org/gdal/ticket/3221#comment:5) which caused problems in proper application of scales and offset on MODIS layers - see https://github.com/ropensci/MODIStsp/issues/163 If you are experiencing problems with MODIStsp and you have GDAL > 2.3 on your system, you are strongly encouraged to update the package!

### Bug discovered in MODIStsp!

We are sorry to report that we recently discovered a nasty bug (or rather, a stupid mistake…) in the MODIStsp package. The bug led to improper computation of custom spectral indices in the case that their formula included addition or subtraction operations on reflectance values (e.g., something like $\frac{(\rho_{NIR}+0.1)}{\rho_{Red}}$, with $\rho$ indicating a reflectance). What is affected Values of the following Additional Spectral Indices selectable using the MODIStsp GUI:

### MODIStsp approved on rOpenSci!

We are happy to report that our MODIStsp package for automatic preprocessing of MODIS time series has been recently approved for being included in the rOpenSci ecosystem of R packages for reproducible science! We wish to thank reviewers Leah Wasser and Jeffrey Hanson for providing really valuable insights during the onboarding review process. We think their contribution really helped in improving the package! Please also note that MODIStsp website was also migrated, and is now available at http://ropensci.

### MODIStsp v. 1.3.4 is out ! Now allowing interactive definition of processing extent!

We are happy to report that a new version of MODIStsp (1.3.4) is on CRAN as of today ! The new version introduces a strongly improved GUI (thanks mainly to @lwasser comments in her review for MODIStsp onboarding on ropensci). The new GUI facilitates the selection of layers to be processed, and allows interactive selection of the processing spatial extent over a map (thanks to @timsalabim and @timelyportfolio for implementing some changes on mapview to allow this!

### A new RStudio addin to facilitate inserting tables in Rmarkdown documents

In the last months, I started increasingly using Rmd documents for preparing scientific reports, blog posts, etcetera. While I really like the flexibility offered by the system, one thing that I thought could be improved is the support for easily inserting tables. So, “inspired” also by the recent addition of the excellent insert image addin in blogdown, I decided to give it a go and try to implement some kind of addin to facilitate table insertion in Rmd documents.

### Automatically importing publications from bibtex to a hugo-academic blog

The problem I am in the process of migrating my (rather ugly) small blog from “Bloggers” to blogdown and, as several others, I choose to use the hugo-academic theme due to its good looks, simplicity, and “focus” towards researchers. One nice feature of hugo-academic is that it includes out-of-the-box a “Publications” section, allowing researchers to easily create a list of their publication as a section of the website. Unfortunately, in order to populate that list, users have to manually create one different .

### Speeding up spatial analyses by integrating sf and data.table: a test case

The problem Last week, I replied to this interesting question posted by @Tim_K over stackoverflow. He was seeking efficient solutions to identify all points falling within a maximum distance of xx meters with respect to each single point in a spatial points dataset. If you have a look at the thread, you will see that a simple solution based on creating a “buffered” polygon dataset beforehand and then intersecting it with the original points is quite fast for “reasonably sized” datasets, thanks to sf spatial indexing capabilities which reduce the number of the required comparisons to be done (See http://r-spatial.

### MODIStsp 1.3.3 is out - Speeding things up and squashing some bugs !

A new version of MODIStsp (1.3.3) is on CRAN as of today ! Below, you can find a short description of the main improvements. Processing speed improvements Processing of MODIS layers after download (i.e., scale and offset calibration, computation of Spectral Indexes and Quality Indicators) is now much faster. As you can see in the figure, processing time was almost halved on my (not so fast) laptop. This was achieved by modifying all computation functions so to use raster::calc() and raster::overlay() (more on this in a later post).