Re: [R-sig-Geo] predict a map from point data

2011-02-28 Thread Tom Gottfried
Hi Sadz, Am 28.02.2011 01:54, schrieb Sadz A: Hi, I'm trying to predict the distribution of timber over an area, I have point location data- so it would make sense to use a krigging to interpolate the data over the whole map. Unfortunately the krigging predictions are pretty bad.

Re: [R-sig-Geo] extracting coordinates

2011-02-28 Thread Edzer Pebesma
On 02/28/2011 04:59 PM, Robin W Hunnewell wrote: Hi, I'm going through some initial data inspection, and working through steps in the Applied Spatial Data analysis with R book. Following steps in Ch. 2 of the Applied Spatial Data analysis with R book, I was able toextract a set of

Re: [R-sig-Geo] extracting coordinates

2011-02-28 Thread Tom Gottfried
Hi Robin, could you please post some example code (possibly self-contained, e.g. with meuse data)? So it's less guessing what you actually did. More on this topic: http://www.r-project.org/posting-guide.html regards, Tom Am 28.02.2011 16:59, schrieb Robin W Hunnewell: Hi, I'm going through

[R-sig-Geo] extracting coordinates

2011-02-28 Thread Robin W Hunnewell
Hi again,Thanks, sorry about that - here is the code to illustrate what I did -following the ASDAR book example of choosing a subset of coordinates in Brazil: brazil[1] 4 5 6 7 8 coordinates(CRAN_sp[brazil, ])coords.x1 coords.x24 -49.26667 -25.416675 -42.86667 -20.750006 -43.2 -22.97

Re: [R-sig-Geo] extracting coordinates

2011-02-28 Thread Roger Bivand
On Mon, 28 Feb 2011, Robin W Hunnewell wrote: Hi again, Thanks, sorry about that - here is the code to illustrate what I did - following the ASDAR book example of choosing a subset of coordinates in Brazil: Thanks for a clear report, this was a bug introduced three months ago. A patched sp

Re: [R-sig-Geo] cropping in raster package loses color table?

2011-02-28 Thread Robert Hijmans
Don, The colortable is apparently not preserved when using crop() from the raster package. This is something I would find useful. I agree. Color table support is relatively recent and it is ignored by most functions (and hence lost when using crop). That needs improvement. (also, is there

[R-sig-Geo] converting lat long points to UTM

2011-02-28 Thread Arnold Salvacion
Dear Colleagues, Good day! I have a data points collected using GPS..It was on latitude and longitude coordinate system ..I wonder if there's any function in R where I could convert those GPS data points to UTM (e.g. UTM Zone 51N)?  Thanks in advance Arnold [[alternative HTML version

Re: [R-sig-Geo] converting lat long points to UTM

2011-02-28 Thread Michael Sumner
The rgdal package has the project() function for direct conversion to/from longlat (WGS84) - via the PROJ.4 library, via GDAL - all embedded in the package. library(rgdal) xy - cbind(c(118, 119), c(10, 50)) project(xy, +proj=utm +zone=51 ellps=WGS84) [,1][,2] [1,] -48636.65 1109577

Re: [R-sig-Geo] converting lat long points to UTM

2011-02-28 Thread Michael Sumner
I just noticed that proj4 package has been updated after several years of stasis, this might be helpful if rgdal is overkill for you: library(proj4) ptransform(cbind(xy)/180*pi, +proj=longlat +ellps=WGS84, +proj=utm +zone=51 +ellps=WGS84) [,1][,2] [,3] [1,] -48636.65 11095770