0

全国のラスターをプロットする必要があります。cellsize=300 を試し、64 ビット システムを使用しました。Memory.limit() は 8148 です。コードを実行すると、「エラー: サイズ 3.6 Gb のベクトルを割り当てられません」というメッセージが引き続き表示されます。時々、Windows が動作を停止します。さらに悪いことに...

このような大規模なデータセットを処理できる他の方法はありますか? ところで、私は ArcGIS の方が詳しいです。ありがとう!!!

{

    x.min <- -6328997.74765339; x.max <- 2182662.25234661 # Extent of easting coordinates
    y.min <- 310413.438361092; y.max <- 5448183.43836109 # Extent of northing coordinates
    n <- 2351      
    center <- read.csv ("J:\\...,header=T)
    attach(center)
    center <- as.matrix (center) # XY corrdinates #    
    emp <- read.csv ("J:\\...,header=T, sep=",")
    attach(emp)

    n.rows <- 17126
    cellsize <- 300
    n.cols <- 28373

    x.max <- x.min + n.cols * cellsize          # Assures square cells are used#
    y.0 <- seq(y.max-cellsize/2, y.min+cellsize/2, length.out=n.rows) 
    x.0 <- seq(x.min+cellsize/2, x.max-cellsize/2, length.out=n.cols)   

system.time(
  {
    i <- order(emp, decreasing=TRUE)
    emp <- emp[i]
    center <- center[i, , drop=FALSE]

    owner <- matrix(0, n.rows, n.cols)
    gravity.max <- matrix(0, n.rows, n.cols)

    for (i in 1:n) {
      r <- emp[i] / outer((y.0 - center[i,2])^2, (x.0 - center[i,1])^2, "+")
      update <- which(r >= gravity.max)
      gravity.max[update] <- r[update]
      owner[update] <- i
    }  
  })
4

1 に答える 1