提取函数在r中给出警告消息并且没有数据

时间:2016-05-15 09:02:45

标签: r r-raster

我想从rasterdata中进行一次分析,并将信息添加到多边形中,但是我收到此警告并且extration只包含空值

警告讯息: 在.local(x,y,...)中:   无法返回sp对象,因为数据长度在多边形之间变化

可能是什么问题?上周我使用相同的信息进行了相同的提取,并且工作正常。公式是

expop <- extract(rasterdata, floods1985, small=TRUE, fun=sum, na.rm=TRUE, df=FALSE,  nl=1, sp=TRUE)

洪水数据1985年

    head(floods1985)
      ID   AREA CENTRIODX CENTRIODY DFONUMBER GLIDE__         LINKS OTHER NATIONS
    0  1  92620     5.230    35.814         1    <NA>       Algeria  <NA>    <NA>
    1  2 678500   -45.349   -18.711         2    <NA>        Brazil  <NA>    <NA>
    2  3  12850   122.974    10.021         3    <NA>   Philippines  <NA>    <NA>
    3  4  16540   124.606     1.015         4    <NA>     Indonesia  <NA>    <NA>
    4  5  20080    32.349   -25.869         5    <NA>    Mozambique  <NA>    <NA>
    5  6   1040    43.360   -11.652         6    <NA> Comoros islas  <NA>    <NA>
      X_AFFECTED
    0       <NA>
    1       <NA>
    2       <NA>
    3       <NA>
    4       <NA>
    5       <NA>
AND_RIVERS
    0  Northeastern
    1  States: Rio de Janeiro, Minas Gerais a Espirito Santo
    2  Towns: Tanjay a Pamplona
    3  Region: Northern Sulawesi; Towns: Gorontalo Regency
    4 Provinces: Natal, Maputo; Rivers: Nkomati, Omati, Maputo, Umbeluzi, Incomati, Limpopo, Pungue, Buzi a Zambezi; Town: Ressano Garcia
    5 Isla of Anjouan; Villages: Hassimpao, Marahare, Vouani
      RIVERS      BEGAN      ENDED DAYS DEAD DISPLACED     X_USD_            MAIN_CAUSE
    0   <NA> 1985/01/01 1985/01/05    5   26      3000       <NA>            Heavy rain
    1   <NA> 1985/01/15 1985/02/02   19  229     80000 2000000000            Heavy rain
    2   <NA> 1985/01/20 1985/01/21    2   43       444       <NA> Brief torrential rain
    3   <NA> 1985/02/04 1985/02/18   15   21       300       <NA> Brief torrential rain
    4   <NA> 1985/02/09 1985/02/11    3   19      <NA>    3000000            Heavy rain
    5   <NA> 1985/02/16 1985/02/28   13    2     35000    5600000      Tropical cyclone
      SEVERITY__  SQ_KM   X_M___
    0        1.0  92620 5.665675
    1        1.5 678500 7.286395
    2        1.0  12850 4.409933
    3        1.0  16540 5.394627
    4        1.5  20080 4.955976
    5        1.0   1040 4.130977

0 个答案:

没有答案