Skip to content

Still error exporting ascii grid generated by DTM grid, please any suggestions?

3 messages · Tobin Cara, Robert J. Hijmans, Paul Hiemstra

#
Hello,

I am still receiving a bizarre error:

Error in write.asciigrid(data_int_ked[1], name1) : 
  Asciigrid does not support grids with non-square cells

I do not understand this as I am putting interpolated data back into the cells of an ascii DTM grid with square cells. Information on the DTM I am kriging to is below (I have combined two datasets into elev, COS7 and the Z elevation): 

Thank you in advance for your help,

Cara
Object of class SpatialGridDataFrame
Coordinates:
        min      max
X 550119.63 674619.6
Y  79073.03 167073.0
Is projected: NA 
proj4string : [NA]
Number of points: 2
Grid attributes:
  cellcentre.offset cellsize cells.dim
X         550369.63      500       249
Y          79323.03      500       176
Data attributes:
       Z              COS7          
 Min.   :  380   Min.   :   -1.510  
 1st Qu.: 1500   1st Qu.:    0.180  
 Median : 2143   Median :    0.630  
 Mean   : 2077   Mean   :    2.083  
 3rd Qu.: 2663   3rd Qu.:    4.190  
 Max.   : 4471   Max.   :    8.730  
 NA's   :22337   NA's   :22337.000
#
Hi Cara,

It would be easier to respond if you provided some information about
"data_int_ked", from the information you provide it is not obvious
what kind of object it is, and what the result of subsetting it with
[1] would be.

class(data_int_ked[1])
summary(data_int_ked[1])
str(data_int_ked[1])

I am guessing that you want to use is data_int_ked[,1]

Hth,

Robert
On Fri, Nov 27, 2009 at 7:10 AM, Tobin Cara <cara.tobin at epfl.ch> wrote:
2 days later
#
Hi,

Did you try to export the data using writeGDAL (rgdal-package)? Does 
this generate the same problem?

cheers,
Paul
Tobin Cara wrote: