[R-sig-Geo] converting from images or spatialgriddataframes to kasc
Els Ducheyne
educheyne at avia-gis.be
Tue Aug 25 12:49:36 CEST 2009
>
>> Dear list
> I have been trying to convert input data from either images or
> spatialgriddataframes to kasc for enfa modelling
> However I keep getting a strange error that the cell size is not the
> same in the different dimensions - see below. Is there anyone that
> can enlighten because I am really stuck
>
> Thanks
> Els
>
> 1. from im to asc
> > summary(aedes.extra)
> Length Class Mode
> meandaylst 11 im list
> dem 11 im list
> water 11 im list
> dist2water 11 im list
> corine 11 im list
> dist2harbour 11 im list
> dist2protected 11 im list
> meanyearlyEVI 11 im list
> EVIA1 11 im list
> EVIA2 11 im list
> EVImax 11 im list
> EVImin 11 im list
> EVIp1 11 im list
> EVIp2 11 im list
> LSTdayA1 11 im list
> LSTdayA2 11 im list
> LSTdaymax 11 im list
> LSTdayp1 11 im list
> LSTdayp2 11 im list
> meannightLST 11 im list
> LSTnightA1 11 im list
> LSTnightA2 11 im list
> LSTnightmax 11 im list
> LSTnightp1 11 im list
> LSTnightp2 11 im list
> dens 11 im list
> > aedes.extra$meandaylst$xstep
> [1] 0.01
> > aedes.extra$meandaylst$ystep
> [1] 0.01
> > test<-im2asc(aedes.extra$meandaylst)
> Error in im2asc(aedes.extra$meandaylst) :
> the grid cellsize should be identical for both X and Y directions.
>
> 2. from spatialgriddataframe to kasc
>
> > summary(grids)
> Object of class SpatialGridDataFrame
> Coordinates:
> min max
> coords.x1 2.546947 7.236947
> coords.x2 49.446575 53.626575
> Is projected: NA
> proj4string : [NA]
> Number of points: 2
> Grid attributes:
> cellcentre.offset cellsize cells.dim
> 1 2.551947 0.01 469
> 2 49.451575 0.01 418
> Data attributes:
> meanlstday dem soilmoist
> dist2water dens densr
> corine dist2harbour meanyearlyEVI
> Min. : 0.0 Min. : -500.00 Min. : 0.00 Min. :
> 0.000e+00 Min. :2.364e-07 Min. :3.742e-09 Min. :0.000
> Min. :0.000e+00 Min. :0.0000
> 1st Qu.: 0.0 1st Qu.: 2.00 1st Qu.: 97.00 1st Qu.:
> 2.000e-02 1st Qu.:1.497e-01 1st Qu.:2.369e-03 1st Qu.:0.000
> 1st Qu.:3.105e-01 1st Qu.:0.3000
> Median :286.4 Median : 16.00 Median : 100.00 Median :
> 5.099e-02 Median :2.431e+00 Median :3.847e-02 Median :0.000
> Median :6.938e-01 Median :0.3575
> Mean :210.5 Mean : 84.37 Mean : 94.12 Mean :
> 7.541e-02 Mean :9.006e+00 Mean :1.425e-01 Mean :1.003
> Mean :7.726e-01 Mean :0.3627
> 3rd Qu.:287.4 3rd Qu.: 101.00 3rd Qu.: 100.00 3rd Qu.:
> 1.044e-01 3rd Qu.:1.115e+01 3rd Qu.:1.764e-01 3rd Qu.:2.000
> 3rd Qu.:1.123e+00 3rd Qu.:0.4260
> Max. :292.0 Max. : 687.00 Max. : 100.00 Max. :
> 4.809e-01 Max. :6.319e+01 Max. :1.000e+00 Max. :6.000
> Max. :2.458e+00 Max. :0.6874
> NA's :107457.00 NA's :107784.00 NA's :
> 1.074e+05
> NA's :1.069e+05
> EVIA1 EVIA2 EVImax
> EVImin EVIp1 EVIp2 LSTdayA1
> LSTdayA2 LSTdaymax
> Min. :0.000e+00 Min. :0.000e+00 Min. :-0.3000
> Min. :-0.45415 Min. : 0.0 Min. : 0.0 Min. : 0.000
> Min. : 0.000 Min. : 0.0
> 1st Qu.:4.200e-14 1st Qu.:4.100e-14 1st Qu.:-0.1600 1st
> Qu.:-0.30000 1st Qu.: 0.0 1st Qu.: 0.0 1st Qu.: 0.000 1st
> Qu.: 0.000 1st Qu.: 0.0
> Median :1.087e-01 Median :2.369e-02 Median : 0.5638 Median :
> 0.18672 Median :258.1 Median :141.9 Median :10.991 Median :
> 1.141 Median :298.0
> Mean :9.665e-02 Mean :2.708e-02 Mean : 0.3528 Mean :
> 0.08641 Mean :195.3 Mean :126.1 Mean : 8.494 Mean :
> 1.139 Mean :219.5
> 3rd Qu.:1.489e-01 3rd Qu.:4.218e-02 3rd Qu.: 0.6415 3rd Qu.:
> 0.25174 3rd Qu.:267.5 3rd Qu.:200.2 3rd Qu.:11.655 3rd Qu.:
> 1.485 3rd Qu.:299.6
> Max. :3.276e-01 Max. :1.880e-01 Max. : 0.9030 Max. :
> 0.55256 Max. :360.0 Max. :360.0 Max. :27.253 Max. :
> 16.695 Max. :308.8
>
> LSTdayp1 LSTdayp2 meannightLST LSTnightA1
> LSTnightA2 LSTnightmax LSTnightp1 LSTnightp2
> Min. : 0.0 Min. : 0.0 Min. : 0.0 Min. : 0.000
> Min. : 0.0000 Min. : 0.0 Min. : 0.0 Min. : 0.0
> 1st Qu.: 0.0 1st Qu.: 0.0 1st Qu.: 0.0 1st Qu.: 0.000
> 1st Qu.: 0.0000 1st Qu.: 0.0 1st Qu.: 0.0 1st Qu.: 0.0
> Median :264.8 Median :233.0 Median :277.3 Median : 8.162
> Median : 0.4818 Median :287.4 Median :256.3 Median :212.2
> Mean :196.0 Mean :182.8 Mean :200.3 Mean : 7.675
> Mean : 2.1540 Mean :211.1 Mean :190.0 Mean :171.1
> 3rd Qu.:267.1 3rd Qu.:259.1 3rd Qu.:278.6 3rd Qu.: 9.365
> 3rd Qu.: 1.8035 3rd Qu.:288.3 3rd Qu.:261.9 3rd Qu.:317.7
> Max. :298.9 Max. :351.3 Max. :283.9 Max. :181.431
> Max. :154.8919 Max. :293.4 Max. :360.0 Max. :360.0
>
> > test<-spixdf2kasc(grids)
> Error in spixdf2kasc(grids) :
> the cellsize should be the same in x and y directions
>>
>
More information about the R-sig-Geo
mailing list