Re: [R-sig-Geo] memory issue on R with Linux 64

2009-01-29 Thread Alexander.Herr
Street GPO Box 284 Crace, ACT 2601 Phone/www (02) 6242 1542; 6242 1705(fax) 0408679811 (mob) home: www.csiro.au/people/Alexander.Herr Webadmin ABS: http://ausbats.org.au Sustainable Ecosystems: www.cse.csiro.au -Original Message- From

Re: [R-sig-Geo] memory issue on R with Linux 64

2009-01-29 Thread Alexander.Herr
Hi Edzer, I didn't expect R to do magic (although it does it better than most prgs). What surprised me was that under Linux there was no use of swap space - I hoped memory handling would be including swap space. Cheers Herry -Original Message- From: Edzer Pebesma [mailto:edzer.pebe

[R-sig-Geo] memory issue on R with Linux 64

2009-01-28 Thread Alexander.Herr
Hi List, I get an error using readGDAL{rgdal}: cannot allocate vector of size 3.1 Gb I am using Linux 64bit (opensuse 11) with 4 gig swap and 4 gig Ram and R 2.8.0. The load monitor shows that most of Ram is used up and then when Swap use starts increasing, R returns the error. Is there anyt

Re: [R-sig-Geo] calculate raster values based on vector regions

2009-01-28 Thread Alexander.Herr
Thanks Edzer, That would do it. Unfortunately I can't read the (ESRI) grid, it is too large: raster1 has GDAL driver AIG and has 73772 rows and 80264 columns Error in array(dim = as.integer(c(rev(output.dim), length(band : 'dim' specifies too large an array I 'll have to cut into smalle

Re: [R-sig-Geo] calculate raster values based on vector regions

2009-01-28 Thread Alexander.Herr
Hi list, I try to explain my problem a bit better. 1) Vector and raster have the same extent. 2) Vector data: Several polygones with different attribute values 3) raster data: A raster with points over the areas (and also NAs for areas where it is not possible to have a value from polygones). T

[R-sig-Geo] calculate raster values based on vector regions

2009-01-27 Thread Alexander.Herr
Hi List, How would I go about assigning values to a raster based on polygon regions in R. Examples would be most appreciated. I have (vector) regions assigned to a specific value. The raster has NAs and some pixels where these values are likely to occur on ground. I need to assign these valu

Re: [R-sig-Geo] writing tiff file by row {raster}

2008-12-23 Thread Alexander.Herr
Thanks Robert Yes, I do work with real numbers. So easiest format for simple grids I'd guess is geotiff or something more complicated for bands. I really only need a compressed format for mapping the grid (and saving disk space) and I would guess that people would not (could not) process large

[R-sig-Geo] writing tiff file by row {raster}

2008-12-22 Thread Alexander.Herr
Hi List, I can write out ascii grids by row (see below), but I can't figure out how to do this in say compressed geotiff or another compressed lossless format readable by ESRI. require(rgdal) require(raster) # read and write row by row; write to ascii file rs <- raster.from.file(system.file("e

Re: [R-sig-Geo] reading ascii grid memory issues

2008-12-04 Thread Alexander.Herr
Thanks Barry > > Hi List, > > I am unable to read in a 7.8Gb ascii grid using readAsciiGrid {maptools}/ > read.asciigrid {sp}; R runs out of memory. I have 4Gb ram and 4Gb swap, so > things are getting tight. > > I am wondering if anyone has alternative options (preferably with example) > that

[R-sig-Geo] reading ascii grid memory issues

2008-12-04 Thread Alexander.Herr
) home: www.csiro.au/people/Alexander.Herr Webadmin ABS: http://ausbats.org.au Sustainable Ecosystems: www.cse.csiro.au ___ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: [R-sig-Geo] accumulate gridcells to a specific value

2008-07-31 Thread Alexander.Herr
Hi Barry, > Can you explain a bit more about your problem? > * What are the inputs? Just a grid of values or are there some starting points? Inputs is a floating grid. Starting point is 1) the highest values in the grid. Once first accumulation achieved, exclude this area and 2) find highest valu

[R-sig-Geo] accumulate gridcells to a specific value

2008-07-30 Thread Alexander.Herr
Hi List, I am trying to accumulate gridcells to a specific value. This means I need to extent the nearest neighbours (or search radius) to a size so that the sum of gridcell values reaches the desired value (or stops if sum value of gridcells/radius goes beyond a specific size). It should start

[R-sig-Geo] 3d surface plot of large data

2006-12-13 Thread Alexander.Herr
Dear list, I am trying to plot a grid with an overlayed height. I have a dataframe with four variables: x,y,gridvalue,height. The dataframe has 2.5mio observations (ie grid points), I assign colors through the gridvalue using map_color_gradient thus producing: x,y,gridvalue,height,gridcol as vari

Re: [R-sig-Geo] how is variance defined in krige {gstats}

2006-12-06 Thread Alexander.Herr
Hi all, from what I could devine (with the help of collegues) out of the gstat documentation (should have looked at www.gstat.org earlier...) the kriging variance (var1.var) is the kriging standard error ^2. I am still trying to get Chiles (1999) as it will be able to enlighten me on other things

[R-sig-Geo] how is variance defined in krige {gstats}

2006-12-05 Thread Alexander.Herr
Hi list/Edzer, I am trying to determine errors in the krige output and can't find any documentation on the details of the variance output of krige {gstats} (variable var1.var of krige output). How is this variance defined? Basically I am after a way to calculate other statistics like N, standard

Re: [R-sig-Geo] plot() and Jpeg() increase font size and resolution

2006-11-27 Thread Alexander.Herr
Hi Edzer, png also does not increase the file size. Following the commands. The data are located at ftp://ftp.csiro.au/Herry, file qldproperty.Rdata. trellis.par.get("fontsize")->fontsize fontsize$default<-16 fontsize$points<-16 fontsize$text<-18 trellis.par.set("fonts

Re: [R-sig-Geo] plot() and Jpeg() increase font size and resolution

2006-11-26 Thread Alexander.Herr
Thanks to Edzer and Roger, I can now plot with increased font sizes. However, jpeg still does not reproduce these, nor does it show up in high quality. What I would like to do is produce some highresolution jpegs. Any help would be appreciated Thanx Herry R2.4 on Mandriva 10.2 linux. Dr Alexan

Re: [R-sig-Geo] krige{gstat} error with new data prediction

2006-11-26 Thread Alexander.Herr
Thanks Edzer, k1<-krige(z ~ x+y, shp1, a1000, model=m2, nmax=40) produces the following: Error in eval(expr. envir. enclos): object "x" not found In addition: Warning message: grid has empty columns/rows in dimension 2 in: points2grid(points, tolerance). The grid will have empty I was hoping to

[R-sig-Geo] krige{gstat} error with new data prediction

2006-11-23 Thread Alexander.Herr
Dear list, I am using point data of an area as shapefile import (shp1). The attribute data is log(AREA) as z reflecting areas size of the polygons. Grid data (1000m pixel) as ascii grid imports (a1000) of the same bounding box. Point and grid file stem from ArcInfo imported into R using readShapeP

[R-sig-Geo] plot() and Jpeg() increase font size and resolution

2006-11-23 Thread Alexander.Herr
Dear list, I am having troubles increasing the fontize when plotting a variogram{gstat} and its model (vgm) with plot and using jpeg(). Also the resolution in the jpeg call does not work. I am using R2.4 on Mandriva 10.2 linux. I can change fontsize with cex.axis in a normal plot, so I presume

Re: [R-sig-Geo] ?Plotting line segments of shapefile in different color

2006-02-01 Thread Alexander.Herr
Oops, option b should read b)use Map2lines and run a for loop on the length of the Map2lines object and circle through the colors library(maptools) fn<-system.file("shapes/fylk-val.shp", package="maptools") read.shape(fn)->xx Map2lines(xx)->s3 xylims<-attr(s3, "maplim") plot(xylims$x, xylims$y, a

Re: [R-sig-Geo] ?Plotting line segments of shapefile in different color

2006-02-01 Thread Alexander.Herr
Thanks Roger, ColorRampPalette only allows for 255 colors, but since I want to show only the difference between each adjacent segment, a few colors will do. So the way to do this is a) use readShapelines and repeat the color listing for the number of line segments (ie length(slot(s2,"lines")/numb

[R-sig-Geo] ?Plotting line segments of shapefile in different color

2006-01-31 Thread Alexander.Herr
Hi List, I am unsuccessfully trying to plot line segments of a shapefile with different colors. Does anyone have a working example for segmented lines? Thanks Herry ___ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/lis

[R-sig-Geo] lm.morantest on glm residuals

2005-07-14 Thread Alexander.Herr
Hi List, I am looking at identifying spatial autocorrelation in glm.nb residuals. Using Moran's test for residuals (lm.morantest) would require an lm object. However, the glm.nb output does not provide this. My questions: 1) is it correct to use lm.morantest on negative binomial residuals (nresid