Re: [R-sig-Geo] simple topography in r
Hello Mr. Akos, Thank you for your suggestion and yes I am following this page to use the getData() function, https://www.gis-blog.com/r-raster-data-acquisition/ and I did plot what I want. Thank you. library(raster) dem<-getData("alt", country="AUS") aus <- getData('GADM' , country="AUS", level=0) plot(dem) plot(aus, add=T) On Tue, Nov 16, 2021 at 7:36 PM Bede-Fazekas Ákos wrote: > > Dear Ani, > Package 'raster' has a function called getData(), which can download > SRTM tiles. Then you can simply plot() them. > Or you can use package 'elevatr'. > But I'm sure there are many other alternative solutions. > HTH, > Ákos Bede-Fazekas > Centre for Ecological Research, Hungary > > > 2021.11.16. 2:44 keltezéssel, ani jaya írta: > > Dear r-sig-geo, > > > > I need to plot a spatial map that shows a topography/elevation. It is > > just to show a basic information so I do not need a high-resolution > > map. I already googled and most of them use ggplot. Is there a > > straightforward way to do this in base r? Any lead is appreciated. > > Thank you so much. > > > > Best regards, > > Ani > > > > #area of interest > > library("maps") > > map('world', xlim = c(100, 160), ylim = c(-45, -5), > > lwd=0.5, col = "grey95", fill = T, interior = T) > > map.axes() > > > > ___ > > R-sig-Geo mailing list > > R-sig-Geo@r-project.org > > https://stat.ethz.ch/mailman/listinfo/r-sig-geo > > ___ > R-sig-Geo mailing list > R-sig-Geo@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-geo ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Re: [R-sig-Geo] simple topography in r
Dear Ani, Package 'raster' has a function called getData(), which can download SRTM tiles. Then you can simply plot() them. Or you can use package 'elevatr'. But I'm sure there are many other alternative solutions. HTH, Ákos Bede-Fazekas Centre for Ecological Research, Hungary 2021.11.16. 2:44 keltezéssel, ani jaya írta: Dear r-sig-geo, I need to plot a spatial map that shows a topography/elevation. It is just to show a basic information so I do not need a high-resolution map. I already googled and most of them use ggplot. Is there a straightforward way to do this in base r? Any lead is appreciated. Thank you so much. Best regards, Ani #area of interest library("maps") map('world', xlim = c(100, 160), ylim = c(-45, -5), lwd=0.5, col = "grey95", fill = T, interior = T) map.axes() ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
[R-sig-Geo] simple topography in r
Dear r-sig-geo, I need to plot a spatial map that shows a topography/elevation. It is just to show a basic information so I do not need a high-resolution map. I already googled and most of them use ggplot. Is there a straightforward way to do this in base r? Any lead is appreciated. Thank you so much. Best regards, Ani #area of interest library("maps") map('world', xlim = c(100, 160), ylim = c(-45, -5), lwd=0.5, col = "grey95", fill = T, interior = T) map.axes() ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo