小编T. *_*ter的帖子

在瑞士国家边界的ggplot中添加浮雕(GEOtiff,.tif)((polygon)shapefile,.shp)

我绘制了瑞士的区域(多边形shapefile)并通过坐标添加了点(瑞士气象站)。

# Boundaries with data-points plotted

library(rgdal)
library(readxl)
library(sp)

library(ggplot2)
library(maptools)
library(plyr)
library(raster)

# import swiss country frontiers (.shp file)

gb <- readOGR("swissBOUNDARIES3D_1_3_TLM_KANTONSGEBIET.shp")

# import coordinates of weather stations from excel file (.xlsx)

coord <- read_excel("SMN-Stationen_20151222.xlsx")
head(coord)
# A tibble: 6 x 10
    SINCE_DT NAT_IND_TX NAT_ABBR_TX           NAME_TX X_KM_COORD_NU     Y_KM_COORD_NU HEIGHT_ASL_NU
      <dttm>      <chr>       <chr>             <chr>         <dbl>             <dbl>         <dbl>
1 2015-12-15       0600         ARO             Arosa        771030            184826          1878
2 2015-10-27       3420         LAC Lachen / Galgenen        707637            226334           468
3 2015-09-08       8040         VEV  Vevey …
Run Code Online (Sandbox Code Playgroud)

r raster shapefile ggplot2 geotiff

3
推荐指数
1
解决办法
481
查看次数

标签 统计

geotiff ×1

ggplot2 ×1

r ×1

raster ×1

shapefile ×1