Re: [R-sig-Geo] Define projection using Raster package

2009-05-07 Thread Robert Hijmans
Thanks Roger, you are right, I had missed that part (don't ask me how). projectRaster() is indeed the function in raster to use (but it is a bit slow). Something like r<-raster(paste(asc.in.dir, "\\", asc.in.files[1], sep="")) projection(r) <- "+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0

Re: [R-sig-Geo] UTM to longlat

2009-05-07 Thread Renaud Lancelot
Thank you Roger. Using do.call("spRbind", myListOfSpatialPointsObjects) do not work, but I can work around. Renaud 2009/5/8 Roger Bivand > On Fri, 8 May 2009, Renaud Lancelot wrote: > > Thank you, here is the full process trying to follow Edzer's suggestion: >> >> library(RODBC) >> library(r

Re: [R-sig-Geo] Define projection using Raster package

2009-05-07 Thread Roger Bivand
On Fri, 8 May 2009, Robert Hijmans wrote: Tim, "proj" is not a valid argument in raster(x, ... ) when x (the first argument) is of class character (i.e. interpreted as a filename); but I can add that argument. For now, what should work is: r<-raster(paste(asc.in.dir, "\\", asc.in.files[i], sep

Re: [R-sig-Geo] Availability of Raster package for Win32

2009-05-07 Thread Robert Hijmans
The raster package depends on rgdal and sp. It is under development in R-forge (that is, it is not on CRAN yet). You can download the source or install it directly on Win and Linux with this command: install.packages("raster", repos="http://R-Forge.R-project.org";) Robert On Fri, May 8, 2009 at 1

Re: [R-sig-Geo] UTM to longlat

2009-05-07 Thread Roger Bivand
On Fri, 8 May 2009, Renaud Lancelot wrote: Thank you, here is the full process trying to follow Edzer's suggestion: library(RODBC) library(rgdal) channel <- odbcConnectAccess("farms.mdb") sigal <- sqlQuery(channel, "select * from T_SIGAL") Liste <- by(sigal, list(zone = sigal$zone),

[R-sig-Geo] Availability of Raster package for Win32

2009-05-07 Thread Hisaji ONO
Hello. Raster package seems to be very interesting since it doesn't require external applications. However currently, no binaries prepared for Win32. Will this Win32 binary available? Regards. ___ R-sig-Geo mailing list R-sig-Geo@stat.math.et

Re: [R-sig-Geo] Define projection using Raster package

2009-05-07 Thread Robert Hijmans
Tim, "proj" is not a valid argument in raster(x, ... ) when x (the first argument) is of class character (i.e. interpreted as a filename); but I can add that argument. For now, what should work is: r<-raster(paste(asc.in.dir, "\\", asc.in.files[i], sep="")) projection(r) <- "+proj=tmerc +lat_0=0

[R-sig-Geo] Define projection using Raster package

2009-05-07 Thread Tim Sippel
I need to take an ESRI grid (.asc) which is in geographic coordinates (lat/lon) and project it to UTM coordinates. The following command is giving me an error saying I'm giving it an undefined argument. I can read the raster without the projs arguement, but I'm stuck when adding that on. > r<-ra

Re: [R-sig-Geo] UTM to longlat

2009-05-07 Thread Renaud Lancelot
Thank you, here is the full process trying to follow Edzer's suggestion: library(RODBC) library(rgdal) channel <- odbcConnectAccess("farms.mdb") sigal <- sqlQuery(channel, "select * from T_SIGAL") Liste <- by(sigal, list(zone = sigal$zone), function(x){ strg

Re: [R-sig-Geo] UTM to longlat

2009-05-07 Thread Jim Burke
Its all quite simple I think (i.e. "hope"). Have you used spTransform(rdgal)? ## here I have a file from a local group delivered ## in UTM format that I transformed OK to long-lat. library(rgdal) # for map projection support; automatically loads sp ## transform internal measurements from UTM to

Re: [R-sig-Geo] UTM to longlat

2009-05-07 Thread Renaud Lancelot
Thank you Edzer. I was hoping there was a simpler solution, but it's still fairly simple. Renaud 2009/5/7 Edzer Pebesma > Yes, but you will not like that call. > > In R (package sp), each spatial data set can only have one single > projection. I'd suggest, in pseudo-code > > - import the data i

Re: [R-sig-Geo] UTM to longlat

2009-05-07 Thread Renaud Lancelot
Thank you Milton. I have already explored this source, without success. Renaud 2009/5/7 milton ruser > Hi Renaud, > > may be you find some solution reading last posts. > > > http://search.r-project.org/cgi-bin/namazu.cgi?query=utm+to+latlong&max=20&result=normal&sort=score&idxname=Rhelp02a&idxn

Re: [R-sig-Geo] UTM to longlat

2009-05-07 Thread Edzer Pebesma
Yes, but you will not like that call. In R (package sp), each spatial data set can only have one single projection. I'd suggest, in pseudo-code - import the data into a data.frame - for each UTM zone do: select the locations set their CRS reproject to long/lat - cbind the locations to a

Re: [R-sig-Geo] UTM to longlat

2009-05-07 Thread milton ruser
Hi Renaud, may be you find some solution reading last posts. http://search.r-project.org/cgi-bin/namazu.cgi?query=utm+to+latlong&max=20&result=normal&sort=score&idxname=Rhelp02a&idxname=functions&idxname=docs cheers milton On Thu, May 7, 2009 at 5:11 PM, Renaud Lancelot wrote: > Dear all, > >

[R-sig-Geo] UTM to longlat

2009-05-07 Thread Renaud Lancelot
Dear all, I have a big dataset (> 200,000 lines) of georeferenced locations where the coordinates are given in UTM, spanning over several zones. Is is possible to convert all the UTM coordinates into longlat WGS84 with a single call ? Renaud -- Renaud Lancelot EDEN Project, coordinator http:

[R-sig-Geo] Change color of binary mask in spatstat

2009-05-07 Thread Etienne Bellemare Racine
I would like to change the color of a binary mask when I plot it. The default is red and beige. I've tried setting col parameter, but it is only working with polygonal windows. data(demopat) plot(demopat$window, col=3) #Not OK : plot(as.mask(demopat$window), col=3) Thanks, Etienne [[al

[R-sig-Geo] RgoogleMaps package

2009-05-07 Thread Markus Loecher
Dear R-mappers and analyzers of spatial data, just wanted to bring your attention to a new package on CRAN, RgoogleMaps, which allows you to plot on Google map tiles in R. The package serves two purposes: (i) Provide a comfortable R interface to query the Google server for static maps (ii) Use the

[R-sig-Geo] Classification of attribute table

2009-05-07 Thread Wesley Roberts
Dear R-sig-geo users, I have the output of a watershed segmentation in vector format (shapefile) which has it's attribute table populated with statistics regarding spectral reflectance of each polygon object. The attribute data was sourced from a geographically co-incident aerial photograph. I