Quantcast
Channel: R-bloggers
Viewing all articles
Browse latest Browse all 12095

Ordnance Survey Terrain 50: merging in R

$
0
0

(This article was first published on R – scottishsnow, and kindly contributed to R-bloggers)

I’ve written previously about Ordnance Survey’s Terrain 50 data and how you can merge it together. You can download the dataset from the OS’s opendata repo.

I’d like to update that post with merging in R. Once you’ve extracted your zipped zips, you can run the following to merge to a single geotiff file:

library(rgdal)
library(gdalUtils)

f = list.files("~/Downloads/temp", pattern=".asc", full.names=T)

mosaic_rasters(f, paste0(normalizePath("~"), "/GIS/OS/Terrain50.tif"))

As previously, this is using gdal, but now via R instead of through the QGIS gui.

var vglnk = { key: '949efb41171ac6ec1bf7f206d57e90b8' }; (function(d, t) { var s = d.createElement(t); s.type = 'text/javascript'; s.async = true; s.src = '//cdn.viglink.com/api/vglnk.js'; var r = d.getElementsByTagName(t)[0]; r.parentNode.insertBefore(s, r); }(document, 'script'));

To leave a comment for the author, please follow the link and comment on their blog: R – scottishsnow.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...


Viewing all articles
Browse latest Browse all 12095

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>