2

解像度と範囲が異なり、不規則なポイント データを持つ 2 つのラスター データセットをマージできません。以下は、各ラスターに関する情報です。これらのデータセットをグリッド ポイントに従ってマージして、延焼モデルを実行できるようにする必要があります (これには、風と傾斜の両方のデータが必要です)。

マージする前に(rasterToPointsを使用して)通常のデータフレームに変換しようとしましたが、違いにより多くのグリッドポイントが失われます。

ラスターをプロジェクト ラスターに合わせてラスター化しようとしましたが、うまくいきませんでした。誰かが助けることができるアイデアを持っているなら、私は本当にあなたの答えに感謝します!

'''

https://globalwindatlas.info/downloads/gis-filesからのデータ

> wind <- raster("ZAF_wind-speed_10m.tif"); wind
class      : RasterLayer 
dimensions : 11271, 11804, 133042884  (nrow, ncol, ncell)
resolution : 0.0025, 0.0025  (x, y)
extent     : 13.33407, 42.84407, -50.31423, -22.13673  (xmin, xmax, ymin, ymax)
crs        : +proj=longlat +datum=WGS84 +no_defs 
source     : C:/Users/s2000128/Documents/Flammability modelling/ZAF/ZAF_wind-speed_10m.tif 
names      : ZAF_wind.speed_10m  

https://datacatalog.worldbank.org/dataset/world-slope-modelからのデータ

> slope <- raster("ZAF1_msk_alt.grd"); slope
class      : RasterLayer 
dimensions : 1548, 1992, 3083616  (nrow, ncol, ncell)
resolution : 0.008333333, 0.008333333  (x, y)
extent     : 16.4, 33, -34.9, -22  (xmin, xmax, ymin, ymax)
crs        : +proj=longlat +ellps=WGS84 +no_defs 
source     : C:/Users/s2000128/Documents/Flammability modelling/slope_deg_0/slope_deg/ZAF1_msk_alt.grd 
names      : ZAF1_msk_alt 
values     : -26, 3264  (min, max)

ここに私が試したことのいくつかの例があります:

1

windresampled <- projectRaster(wind,slope,method = 'ngb'); windresampled

2

wind_points <- rasterToPoints(wind); 
coordinates(wind_points) = ~x+y; 
proj4string(wind_points) = CRS("+init=epsg:4326"); 
gridded(wind_points) = TRUE; 
g_wind <- raster(wind_points); g_wind; 
extent(wind) <- c(16.4,33, -34.9,-22); 
res(wind) <- c(0.0025, 0.0025); 
r_wind <- rasterize(wind_points, g_wind, field = wind_points$z, fun = mean, na.rm = TRUE); r_wind
4

0 に答える 0