Re: [R-sig-Geo] from ArcGIS GRID to .ASC

2008-09-19 Thread milton ruser
Dear all, I tryed both suggestions and they worked fine. In fact, the short solution is require(rgdal) require(maptools) mes01jan<-readGDAL("jan_00") write.asciigrid(mes01jan,"mes01jan.asc") Thanks Mike! Thanks Alex! best wishes, miltinho astronauta brazil On Fri, Sep 19, 2008 at 10:46 PM, Mic

Re: [R-sig-Geo] from ArcGIS GRID to .ASC

2008-09-19 Thread Alexander Brenning
Hi, an alternative to using GDAL for writing ASCII grids is the write.ascii.grid function in the RSAGA package. (RSAGA is an interface to SAGA GIS, but this function actually doesn't require SAGA to be installed on your computer.) write.ascii.grid(data, file, header = NULL, write.header = TR

Re: [R-sig-Geo] from ArcGIS GRID to .ASC

2008-09-19 Thread Michael Sumner
Of course, you can use write.asciigrid() in package sp for a more immediate workaround (sorry for not thinking of this previously!): e.g. x <- readGDAL(system.file("external/test.ag", package="sp")[1]) ## be aware that only the first raster column will be written by attr = 1 write.asciigrid(x

Re: [R-sig-Geo] from ArcGIS GRID to .ASC

2008-09-19 Thread Michael Sumner
I tried this, and AAIGrid is not available for creation by rgdal on my machine. See gdalDrivers() for those available. If you install FWTools you can use a workaround to convert the export externally, e.g. x <- readGDAL(system.file("external/test.ag", package="sp")[1]) ## write to GeoTIFF wr

[R-sig-Geo] how to move a legend?

2008-09-19 Thread Marie-Anne C Serve
Hello, I would like to know how i can move a color scale, now vertical and on the right of the plot, to a horizontal one at the bottom. i am using filled.contour(). thanks Marie ___ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch

Re: [R-sig-Geo] from ArcGIS GRID to .ASC

2008-09-19 Thread Michael Sumner
At a guess the Byte type might be causing problems, please provide (at a minimum) the actual error text you see, and (preferably) exact steps to reproduce the problem - is it specific to your dataset or does it fail with other datasets? Is there any difference if you change the output type or drive

[R-sig-Geo] from ArcGIS GRID to .ASC

2008-09-19 Thread milton ruser
Dear all, I am reading a set of maps from ArcGRID format using rgdal and I need to export to ASC format. But when I try the commands below, I get an error. require(rgdal) mes01jan<-readGDAL("jan_00") image(mes01jan, col=topo.colors(50)) #looks find writeGDAL(mes01jan, "mes01jan.asc", drivername

Re: [R-sig-Geo] cokriging question

2008-09-19 Thread Edzer Pebesma
Dear Tom, Hengl, T. wrote: Dear Edzer, I do have a similar problem (extensive computation time, memory limits). I would like to run interpolation of 60,000 points for 500,000 new points using OK and nmax of 30 closest points (I am using a windowsxp machine with 2GB RAM). But I have doubts t

Re: [R-sig-Geo] cokriging question

2008-09-19 Thread Hengl, T.
Dear Edzer, I do have a similar problem (extensive computation time, memory limits). I would like to run interpolation of 60,000 points for 500,000 new points using OK and nmax of 30 closest points (I am using a windowsxp machine with 2GB RAM). But I have doubts that it can ever run in less

Re: [R-sig-Geo] cokriging question

2008-09-19 Thread Dave Depew
Thanks for the quick responses. I've often done global OK or UK that can take ~ 2-3 days to complete. I always assumed that it was b/c the matrices were so large. Looking at task manager indicated that Rgui.exe only consumed ~ 800 Mb of RAM during the processes. I'll try it by passing the maxd

Re: [R-sig-Geo] cokriging question

2008-09-19 Thread Edzer Pebesma
Good morning Dave (late afternoon here), Chris Taylor wrote: Good morning Edzer and Dave, Thanks for bringing up this point. I had a similar issue recently using krige(). Observations at 5800 locations, attempting to krige() predictions at 112,000 locations resulted in the same "memory.c" er

Re: [R-sig-Geo] cokriging question

2008-09-19 Thread Chris Taylor
Good morning Edzer and Dave, Thanks for bringing up this point. I had a similar issue recently using krige(). Observations at 5800 locations, attempting to krige() predictions at 112,000 locations resulted in the same "memory.c" error message. Reducing predicted locations to <<50,000 and red

Re: [R-sig-Geo] cokriging question

2008-09-19 Thread Edzer Pebesma
Dave, 12000 observations fit, in the c representation, in less than 1 Mb (64 bytes per observation). The issue is that you think that passing maxdist to predict.gstat has an effect. It doesn't; you need to pass it to function gstat(). The same thing happened in this https://stat.ethz.ch/pip

[R-sig-Geo] cokriging question

2008-09-19 Thread Dave Depew
Is there a limit to the # of observations or size of file that can be co-kriged in gstat? I have a ~12000 observation data set (2 variables), the variograms, cross variogram and lmc are fit well, and co-kriging starts ok Linear Model of Coregionalization found. Good. [using ordinary cokriging]