0

I have two .hgt files, and I would like to join them.

Reading files

library(raster)

h1=raster("E:/FILES/S12E043.hgt")

h2=raster("E:/FILES/S13E043.hgt")

How to merge them?

UseR10085
  • 7,120
  • 3
  • 24
  • 54
PATRICK
  • 23
  • 5
  • Without knowing anything about these files or your code or how you want to merge them, all anyone can really do is guess. [See here](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) on making an R question that folks can help with. That includes a sample of data, all necessary code, and a clear explanation of what you're trying to do and what hasn't worked. – camille Oct 13 '19 at 16:17
  • @camille : I modifed the question. – PATRICK Oct 13 '19 at 16:53

1 Answers1

0

You can use raster package to merge them like

library(raster)

m = mosaic(h1, h2, fun=mean)

m is the merged raster.

UseR10085
  • 7,120
  • 3
  • 24
  • 54