Re: [R-sig-Geo] spTransform: unable to convert coordinates

2012-08-16 Thread Martin Ivanov
Dear Roger, Thank You very much for Your swift response. I did some testing of the rgdal revision. crds - matrix(data=c(9.05, 48.52), ncol=2) spPoint - SpatialPoints(coords=crds, proj4string=CRS(paste(+proj=ob_tran +o_proj=longlat +o_lon_p=-162, +o_lat_p=39.25 +lon_0=180 +ellps=sphere

Re: [R-sig-Geo] spTransform: unable to convert coordinates

2012-08-16 Thread Roger Bivand
On Thu, 16 Aug 2012, Martin Ivanov wrote: Dear Roger, Thank You very much for Your swift response. I did some testing of the rgdal revision. crds - matrix(data=c(9.05, 48.52), ncol=2) spPoint - SpatialPoints(coords=crds, proj4string=CRS(paste(+proj=ob_tran +o_proj=longlat +o_lon_p=-162,

[R-sig-Geo] GLS/OLS

2012-08-16 Thread M . Kuntz
Dear List members, after reading several old mail from R-sig-geo and checking the gstat manual there is still sth. confusion about the way how gstat calculates the Regressions. On the on hand some mails, as the the following one, tell that GLS is used to estimate the

[R-sig-Geo] Masking a raster changes its min and max values

2012-08-16 Thread Thiago Veloso
  Dear colleagues,   To mask this image (note max and min values): lai.cal class       : RasterLayer  dimensions  : 5568, 8289, 46153152  (nrow, ncol, ncell) resolution  : 0.00898, 0.00898  (x, y) extent      : -104.4326, -29.99736, -40.00064, 10  (xmin, xmax, ymin, ymax) coord. ref. :

Re: [R-sig-Geo] spTransform: unable to convert coordinates

2012-08-16 Thread Martin Ivanov
Dear Roger, Thank You very much for Your responsiveness. I tested Your new revision with points, data frames and pixels and everything seems to be ok. It is now only this annoying counter-intuitive discrepancy between source and target proj, but it is not really an obstacle. It seems to come

Re: [R-sig-Geo] Masking a raster changes its min and max values

2012-08-16 Thread O'Hanlon, Simon J
Hi Thiago, mask() simply creates a new raster which sets any cells in the calls first argument (lai.cal) to NA if they are NA in the second argument (qc.cal), the mask raster. As far as I am aware it does not otherwise manipulate values in your original raster. I would conclude, that since

[R-sig-Geo] interacting with plots

2012-08-16 Thread Frazier, Tyler James
Hello, I am new to this group and am still working to figure out many things. I have a kind of basic question, regarding using R and interacting with plots. I have been exploring using the spplot in the sp package as a means to interact with plots, but haven't figured out how to use the

[R-sig-Geo] exporting neighbor list to a text file...

2012-08-16 Thread Alok K Bohara, PhD
(I am new to this group.) I have a two-part question. I have a shape file for the US states (excluding Alaska and Hawaii) I am trying to export (or save) the nearest neighbor list to a csv or text file. This is what I did *** USs - readShapeSpatial(usa) # Creating Neighbor List USs.nb

Re: [R-sig-Geo] exporting neighbor list to a text file...

2012-08-16 Thread Roger Bivand
On Thu, 16 Aug 2012, Alok K Bohara, PhD wrote: (I am new to this group.) I have a two-part question. I have a shape file for the US states (excluding Alaska and Hawaii) I am trying to export (or save) the nearest neighbor list to a csv or text file. This is what I did *** USs -

[R-sig-Geo] Estimating multiStrauss interaction radii

2012-08-16 Thread José M . Blanco Moreno
Dear users and experts, I know that my question is not strictly R-related, but... Is there any good strategy (preferably already implemented in R) for estimating interaction radii of a MultiStrauss model? I have been working with function profilepl in spatstat, but I frequently have to

Re: [R-sig-Geo] interacting with plots

2012-08-16 Thread Greg Snow
You could try something like: library(rgdal) library(sp) scot_BNG - readOGR(dsn=dsn, layer=scot_BNG) plot(scot_BNG) tmp - SpatialPoints(locator(1)) proj4string(tmp) - proj4string(scot_BNG) over(tmp, scot_BNG) # or tmp2 - over(scot_BNG, tmp) plot( scot_BNG[!is.na(tmp2),], add=TRUE, col='green')

Re: [R-sig-Geo] interacting with plots

2012-08-16 Thread Frazier, Tyler James
Hi Greg, That works but I can only chose one polygon and have its attributes identified. I want to plot my map, then be able to pan and zoom, and chose several polygons to have their attributes identified (one at a time would be fine). Should I be exploring maptools? Thanks, Ty On Aug 16,

Re: [R-sig-Geo] interacting with plots

2012-08-16 Thread Greg Snow
My example used locator(1) to get one click, but if you just use locator() (without the 1) then you can click in as many places as you want, then it should show you the info for all of them). If you want to click and see the results, then click again and see the new results, etc. then you could

Re: [R-sig-Geo] Masking a raster changes its min and max values

2012-08-16 Thread Thiago Veloso
  Simon,   Thanks for this valuable discussion. Yes, I do think that having the range changed could be an issue. In the case I showed, mask operation appears to have changed all 0 values of the original raster to 0.1 and all 7 values to 6.9, therefore creating differences in the image. This is

Re: [R-sig-Geo] interacting with plots

2012-08-16 Thread Frazier, Tyler James
Hi Greg, The example works fine, but running the tmp - SpatialPoints(locator()) takes a really long time to execute on my map of 12,438 features each with 3 fields. Is there anyway to speed it up? BTW -- I'm running on MacOS Lion with R 2.14.0. Also, the output plots to Quartz, which

Re: [R-sig-Geo] interacting with plots

2012-08-16 Thread Karl Ove Hufthammer
Frazier, Tyler James skreiv: That works but I can only chose one polygon and have its attributes identified. I want to plot my map, then be able to pan and zoom, and chose several polygons to have their attributes identified (one at a time would be fine). I would recommend using QGIS

Re: [R-sig-Geo] interacting with plots

2012-08-16 Thread Greg Snow
Determining if a point is in a polygon is not as simple a task as might be assumed (I can see that it is in there, why can't the computer?). So the computer has to do this check for all (or maybe just some) 12,438 features, so it is not surprising if it is a little slow. The people who created

Re: [R-sig-Geo] Estimating multiStrauss interaction radii

2012-08-16 Thread Rolf Turner
On 17/08/12 04:23, José M. Blanco Moreno wrote: Dear users and experts, I know that my question is not strictly R-related, but... Is there any good strategy (preferably already implemented in R) for estimating interaction radii of a MultiStrauss model? I have been working with function

Re: [R-sig-Geo] Estimating multiStrauss interaction radii

2012-08-16 Thread José M. Blanco Moreno
Thank you Rolf for your very detailed response. As you said, these lists are bloody amazing, and the people who participate actively much more (I mean, those giving advice, not so much for those of us who can, at most, pose partially interesting questions). Points a b understood. (c) Gamma

Re: [R-sig-Geo] Estimating multiStrauss interaction radii

2012-08-16 Thread Rolf Turner
On 17/08/12 14:11, José M. Blanco Moreno wrote: SNIP (c) Gamma parameters greater than 1 are OK for interactions between points of different type. For points of the same type they are not just undesirable, they are verboten. The model is undefined if any gamma_{ii} 1. So if I