Re: [R-sig-Geo] Indicator Kriging in automap

2013-09-17 Thread Francesco Carotenuto
Hi to all. I made some research about this issue and found some helpful information (maybe only for me, because I’m not an expert in this field). Automap mainly depends on gstat. In a very helpful book (Bivand, Pebesma, and Gómez-Rubio 2008. Applied Spatial data Analysis with R), borrowed from

Re: [R-sig-Geo] function to convert to/from U.S. State Plane Coordinates?

2013-09-17 Thread Waichler, Scott R
Erin, Thanks, now I see that I was trying to use spTransform() on a map object instead of a Spatial one. I followed your logic and came up with the following to plot the state of Washington using state plane coordinates instead of the original geographic values. But I get an extraneous triang

Re: [R-sig-Geo] problem with extract() raster package using weight=TRUE

2013-09-17 Thread Robert J. Hijmans
Umberto, The work-around is to assure that the CRS are the same: projection(regioni) <- projection(t500) You should of course only do that when the projections are in fact the same, as in this case. The problem is caused by sp::identicalCRS that compares the verbatim, but not the semantic repres

Re: [R-sig-Geo] writeRaster to TIF changes raster maximum value

2013-09-17 Thread Guillaume Drolet
Hi Robert, Following my previous post, I tried with a smaller extent than the one that was used previously: e <- extent(457785, 516302, 5147085, 5217408) For the rest, I ran the same code as before: > rc <- crop(r, e) > NAvalue(rc) <- 0 > t <- writeRaster(rc, y, overwrite = TRUE, datatype = "IN

Re: [R-sig-Geo] function to convert to/from U.S. State Plane Coordinates?

2013-09-17 Thread Roger Bivand
On Tue, 17 Sep 2013, Waichler, Scott R wrote: Erin, Thanks, now I see that I was trying to use spTransform() on a map object instead of a Spatial one. I followed your logic and came up with the following to plot the state of Washington using state plane coordinates instead of the original g

Re: [R-sig-Geo] KernelUD calculation - coordinates type / transformation from lat/long

2013-09-17 Thread zuzana zajkova
Thank you a lot, Ben! It works perfect! I have just one question... why I cannot use the "h" in calculation of kernel area? Other thing is that I think I can use the argument id=NULL, if there is just one animal, it is not needed to create the id=rep('1', npoints) as you suggested... I have tried

[R-sig-Geo] problem with extract() raster package using weight=TRUE

2013-09-17 Thread up
Hi everybody! I'm a new user, sorry for any kind of errors in posting :-). I'm trying to use* extract()* from raster library to get data values from netcdf file that are inside a shapefile. I'm using rgdal library to manage shapefiles, and raster library to read netcdf file (a very simple file). T

Re: [R-sig-Geo] Note on variogram fitting with polynomial degree

2013-09-17 Thread Caspar Hallmann
Hi Edzer, Thanks for the clarification. Well, ideally, I think variogram() should be made possible to account for "degree". Alternatively a simple note in the help file for variogram along the lines "NOTE: degree is not used in variogram(), Use formula to specify a trend surface instead", might suf

Re: [R-sig-Geo] IDW & Kriging on Spatial Grid not Consistent with IDW & Kriging on Polygon (CRS are the same)

2013-09-17 Thread Edzer Pebesma
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 James, it seems you still didn't get the projections right: > bbox(muni.sp) min max LON 120.7167 121.01800 LAT 14.1000 14.48034 > bbox(brgy_poly) min max x 11285704 11334871 y 1503882 1550830 > bbox(grd) min

Re: [R-sig-Geo] Note on variogram fitting with polynomial degree

2013-09-17 Thread Edzer Pebesma
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 degree is not listed as a parameter in ?variogram, and is ignored, regrettably silently, but this is how R often works when there's a ... in the argument list. The function that accepts degree is ?gstat, and I tried: variogram(gstat(NULL, "lzinc", lo

[R-sig-Geo] Cryptic warning when reading raster which consists only of NULL

2013-09-17 Thread Rainer M Krug
Hi When reading a raster from GRASS which consists only of NULL, a cryptic warning is received: , | Warning in lapply(lres, as.numeric) : NAs introduced by coercion ` This is caused by the line , | lres <- lapply(lres, as.numeric) ` in the debug session below: , | debug: c

[R-sig-Geo] Note on variogram fitting with polynomial degree

2013-09-17 Thread Caspar Hallmann
Dear all, I read in ASDAR: "Residual variograms are calculated by default when a more complex model for the trend is used..." However, I noticed that when using fit.variogram in gstat with an additional option: degree=2, but keeping the formula as an intercept only, does not account for the highe