Error in write.asciigrid

39 views
Skip to first unread message

Natalie E. Wildermann

unread,
May 8, 2014, 11:25:35 PM5/8/14
to tropi...@googlegroups.com, natalie.w...@my.jcu.edu.au
Hi everyone!
I'm trying to export a grid into an ESRI ASCII raster file, but I get the following error:

> write.asciigrid(tspc, "C:/Users/Natalie/Documents/tspc.ag")
Error in write.asciigrid(tspc, "C:/Users/Natalie/Documents/tspc.ag") : 
  Asciigrid does not support grids with non-square cells

However, I don't understand why it says I have non-square cells.. In a previous step using makeGridTopology() I specified the cells to be 0.01 by 0.01
> grid.base <- expand.grid(Long=seq(150.15, 150.75, by=0.01), Lat=seq(-22.30, -21.94, by=0.01))
> coordinates(grid.base) <- ~ Long + Lat
> proj4string(grid.base) <- CRS("+proj=utm +ellps=WGS84")
> gt <- makeGridTopology(grid.base, cellsize = c(0.01, 0.01))

Any ideas on where the problem could be?

Hope you have a wonderful weekend :)

Cheers

Natalie
Reply all
Reply to author
Forward
0 new messages