-
-
Save nistara/0da7412fefbe23e5466876cebd21fa7e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download elevation tif from eg http://www.eea.europa.eu/data-and-maps/data/digital-elevation-model-of-europe | |
# First, convert elevation tif to a space delimited xyz (lng lat elevation) file | |
# $ gdal_translate -of XYZ elevation3x3.tif /tmp/file.xyz | |
df <- read_delim('/tmp/file.xyz', delim=' ', col_names=FALSE) | |
df %>% | |
mutate(X3 = na_if(X3, 0)) %>% | |
ggplot(aes(X1, -X2 + 20 * X3/max(X3, na.rm=TRUE), group=X2)) + | |
geom_line(size=0.05) + | |
ggthemes::theme_map() + | |
coord_equal(0.9) | |
ggsave('/tmp/map.png', width=10, height=10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment