Spatial packages and Travis

A number of R spatial libraries have been updated in the last couple of weeks, and this has played havoc with my Travis–CI build. I had still been using Ubuntu Trusty with Travis which uses old versions of libraries like rgdal and rgeos, so I needed to move to updated versions of these. In addition sf has now become a dependency for a number of spatial packages like tmap, and this uses libudunits2-dev which isn’t installed by default. [Read More]
sf  travis  rstats  gis 

Clip polygons in R

Clipping polygons is a common GIS task. For example, you might want to study local authorities (LADs) in the Yorkshire and the Humber region but can only obtain a shapefile with all the LADs in England. Removing all the LADs outside of the Yorkshire and the Humber can be achieved by ‘clipping’ the LADs, using the extent of the larger region as a template. HUGOMORE42 First, install and load sf for loading the shapefiles, and tidyverse for manipulating the data and plotting the maps. [Read More]
R  rstats  GIS  sf  clip  polygon-clip