Re: [R-sig-Geo] help: krigged map do not show colours

2015-08-05 Thread Jon Skoien
but it fitted well visually. I think also that the prediction grid was not well created. I wiould be grateful to have to hints.code how to create a useful grid and also for the spplot or other alternatives I can send more info if required. Cheers Anand On Tue, Aug 4, 2015 at 1:39 PM, Jon Skoien

Re: [R-sig-Geo] help: krigged map do not show colours

2015-08-05 Thread Jon Skoien
Hi, You have attached some data, but we still dont know exactly what you do with the data (do you use the logarithm, how many bins, did you project the data set...?). However, having had a quick look using the LatLong coordinates (not really recommended), I can see that the variogram from

Re: [R-sig-Geo] What is the reason for Very high value by Universal Kriging based on Nested 3D varigram

2014-12-04 Thread Jon Skoien
It is difficult for us to know exactly what happens as you are not providing a reproducible example. But my guess would be that this is related to your use of a Gaussian variogram without nugget for the first part of the variogram. This can cause rather large weights (positive and negative) if

Re: [R-sig-Geo] subplots of maps in R using hydroTSM package

2014-11-24 Thread Jon Skoien
Hi Zilefac, Your problem is not really related to hydroTSM, but to the fact that hydrokrige uses spplot for plotting, which is again based on the lattice package. This does not use the par()-arguments. Instead there are two other ways for producing multiple plots in one figure: - Save each of

Re: [R-sig-Geo] Error: identicalCRS(x, y) is not TRUE after using the over() command

2014-10-27 Thread Jon Skoien
Hi Angel, We cannot reproduce your problem as we dont have access to your files, but it seems only one of the objects in your over-command is projected (border). Probably it will work better if you set proj4string also for pts1. Cheers, Jon On 10/24/2014 5:12 PM, Angel Ferrero wrote:

Re: [R-sig-Geo] ssplot freezes R [was] really slow plot of Portugal

2014-09-17 Thread Jon Skoien
. Thanks On 16Sep, 2014, at 3:23 PM, Jon Skoien jon.sko...@jrc.ec.europa.eu wrote: Hi Augustin, I guess this is related to the complexity of the border. Switzerland is defined by some nice lines (although not as simple as some of the borders in Sahara), Portugal and Spain have coastlines which can

Re: [R-sig-Geo] really slow plot of Portugal

2014-09-16 Thread Jon Skoien
Hi Augustin, I guess this is related to the complexity of the border. Switzerland is defined by some nice lines (although not as simple as some of the borders in Sahara), Portugal and Spain have coastlines which can be rather complex, including their islands. Setting prt = gadm che = gadm

Re: [R-sig-Geo] Question with spplot for publication

2014-08-22 Thread Jon Skoien
Hi Ma, You should be able to plot the polygon on top of your raster with a panel function. Here is an example with the meuse data: r - raster(system.file(external/test.grd, package=raster)) s - stack(r, r*2) names(s) - c('meuse', 'meuse x 2') spplot(s) data(meuse.riv) meuse.sr =

Re: [R-sig-Geo] question about autoKrige anis1 and anis2

2014-08-01 Thread Jon Skoien
The result you got is the same as for a variogram model from vgm with a nugget effect. This is the ratio of anisotropy, which is one both for the nugget and for the correlated part of the model. See: str(vgm(10, Exp, 300)) str(vgm(10, Exp, 300, 3)) I guess you see something like the second

Re: [R-sig-Geo] how to change the fit.method from autoKrige, please

2014-07-29 Thread Jon Skoien
It seems you cannot change the fit.method from autoKrige or autofitVariogram, it uses the default from gstat::fit.variogram, which is method 7. However, you should probably first try to see why you get the error and what is zero. I assume that your error is that you have zero distances

Re: [R-sig-Geo] Intamap, reduce verbose output of idw method

2013-12-18 Thread jon skoien
Hi Pablo, sorry for a late answer again. I am not sure what is the cause of slow execution of your code. I would either have to look at an example, or you can run it with Rprof(). Then you can see the most time consuming functions, although I am not sure how it works with JIT. If you send the

Re: [R-sig-Geo] Adding raster files from a folder

2011-12-13 Thread jon . skoien
Hi Sajid, You should be able to do something like this: setwd( name of folder) fls = list.files() # you can add a pattern if you only want files of a certain type dst = stack(fls[1]) for (ifile in 2:length(fls)) dst = addLayer(dst, raster(fls[ifile])) And I am sure someone can do this even

Re: [R-sig-Geo] Acessing slot information in spatialPolygon class

2011-12-13 Thread jon . skoien
Hi Rui, I think the following should give you what you are looking for: res$area2 = sapply(slot(res,polygons), function(x) slot(x, area)) Cheers, Jon On 13-Dec-11 13:50, Rui Catarino wrote: Dear all, This may seem a very obvious question but I'm suck and for the past 2h I haven't been able