Re: [R-sig-Geo] How do I set ENVI file interleave when using GDALTransientDataset?

2009-07-10 Thread Roger Bivand
On Thu, 9 Jul 2009, Jonathan Greenberg wrote: I'm writing a function to mimic ENVI/IDL's ENVI_SETUP_HEAD using rgdal, and I was wondering how I set the interleave (BIP vs BSQ vs BIL)? You'll need to use the options= argument to pass through these values when you instantiate the transient

Re: [R-sig-Geo] How do I set ENVI file interleave when using GDALTransientDataset?

2009-07-10 Thread Roger Bivand
On Fri, 10 Jul 2009, Roger Bivand wrote: On Thu, 9 Jul 2009, Jonathan Greenberg wrote: I'm writing a function to mimic ENVI/IDL's ENVI_SETUP_HEAD using rgdal, and I was wondering how I set the interleave (BIP vs BSQ vs BIL)? You'll need to use the options= argument to pass through these

Re: [R-sig-Geo] More questions on setting up ENVI headers...

2009-07-10 Thread Roger Bivand
On Thu, 9 Jul 2009, Jonathan Greenberg wrote: R-sig-geo'ers: I am using the following code to create an ENVI header: driver=ENVI d.drv - new(GDALDriver, driver) tds.out - new(GDALTransientDataset, driver = d.drv, rows = dims[2],cols = dims[1], bands = bands, type = type) gt -

[R-sig-Geo] spTransform: wrong results??

2009-07-10 Thread Agustin Lobo
I'm finding conflicting results at comparing results of converting UTM ED50 coordinates to lon,lat WGS84 using spTransform() (thus, proj4) and other programs such as GlobalMapper and Compegps. My main surprise is that spTransform() yields the same result whatever the ellps field for the inverse

Re: [R-sig-Geo] spTransform: wrong results??

2009-07-10 Thread Roger Bivand
On Fri, 10 Jul 2009, Agustin Lobo wrote: I'm finding conflicting results at comparing results of converting UTM ED50 coordinates to lon,lat WGS84 using spTransform() (thus, proj4) and other programs such as GlobalMapper and Compegps. My main surprise is that spTransform() yields the same

Re: [R-sig-Geo] spTransform: wrong results??

2009-07-10 Thread Agustin Lobo
But if I use: meuse.lonlatintlWGS84 - spTransform(meuse.utm, CRS(+proj=lonlat +datum=WGS84)) get the same result. Also, don't know where I should put the towgs84= field, have searched the R doc for towgs and do not find anything. I've looked in the doc you mention, and towgs84= must include a

Re: [R-sig-Geo] spTransform: wrong results??

2009-07-10 Thread Roger Bivand
On Fri, 10 Jul 2009, Roger Bivand wrote: On Fri, 10 Jul 2009, Agustin Lobo wrote: I'm finding conflicting results at comparing results of converting UTM ED50 coordinates to lon,lat WGS84 using spTransform() (thus, proj4) and other programs such as GlobalMapper and Compegps. My main surprise

Re: [R-sig-Geo] spTransform: wrong results??

2009-07-10 Thread Roger Bivand
On Fri, 10 Jul 2009, Agustin Lobo wrote: But if I use: meuse.lonlatintlWGS84 - spTransform(meuse.utm, CRS(+proj=lonlat +datum=WGS84)) get the same result. Also, don't know where I should put the towgs84= field, have searched the R doc for towgs and do not find anything. I've looked in the doc

Re: [R-sig-Geo] Slope and Aspect calculations in R

2009-07-10 Thread Thomas Adams
Josh, I use R GRASS together on both MacOS X and Linux without problems. It's very direct to write a shell script that calls both R GRASS within a single script. Writing a R script that calls GRASS may be more tedious to do what you want. Writing a shell script that calls both may be the

[R-sig-Geo] Fwd: spTransform: wrong results??

2009-07-10 Thread Agustin Lobo
Roger, This part of your message: As expected, when +towgs84= is not set, no datum shift occurs, and the same happens when the target datum is not specified. In general +datum= is to be prefered to +ellps=, because the datum always fixes the ellipsoid, but the ellipsoid never fixes the datum. is

Re: [R-sig-Geo] spTransform: wrong results??

2009-07-10 Thread Roger Bivand
On Fri, 10 Jul 2009, Agustin Lobo wrote: Roger, This part of your message: As expected, when +towgs84= is not set, no datum shift occurs, and the same happens when the target datum is not specified. In general +datum= is to be prefered to +ellps=, because the datum always fixes the ellipsoid,

[R-sig-Geo] [Report #7 - midterm] Kriging with GRASS and R: v.autokrige port to wxPython and more

2009-07-10 Thread Anne Ghisla
Hello all, and sorry for cross-posting, this week has been full of improvements: - CLI with optional arguments is up and running - interface creation is no more delayed by vector map filtering - dependencies are checked all at the beginning - no risk of mid-process crashes if something is missing

Re: [R-sig-Geo] [SoC v.autokrige2.py] autoKrige() and projected data

2009-07-10 Thread Paul Hiemstra
Hi Edzer, Anne and r-sig-geo, I adapted the code of automap in reaction to this problem and included it in the new version of automap taht should be released somewhere next week. from the documentation of autoKrige(): 'autoKrige' performs some checks on the coordinate systems of

Re: [R-sig-Geo] Slope and Aspect calculations in R

2009-07-10 Thread Tomislav Hengl
Yes: SAGA runs normally on Linux (I use it also), but you can not use the command line from R (i.e. RSAGA) to pass command to SAGA :( But you can use R to pass command lines to SAGA without RSAGA (i.e. the batch files): http://saga-gis.wiki.sourceforge.net/Executing+Modules+with+SAGA+CMD

[R-sig-Geo] rgdal pckg: Convert LL to UTM

2009-07-10 Thread Steve Hong
Dear List, Thanks again for answering my question. I was able to convert LL to UTM using 'rgdal' package. Below is the code I used. library(rgdal) my.data2 - read.delim(clipboard, header=T) my.data - SpatialPoints(my.data, proj4string=CRS(+proj=longlat +ellps=WGS84)) my.data.utm -

Re: [R-sig-Geo] How do I set ENVI file interleave when using GDALTransientDataset?

2009-07-10 Thread Jonathan Greenberg
Roger, thanks, but I've modded the call to say: tds.out - new(GDALTransientDataset, driver = d.drv, rows = dims[2],cols = dims[1], bands = bands, type = type, options=INTERLEAVE=BIL) I THINK this is right, because if I change the interleave to something weird, say: tds.out -

Re: [R-sig-Geo] spTransform: wrong results??

2009-07-10 Thread Roger Bivand
On Fri, 10 Jul 2009, Agustin Lobo wrote: Regarding the towgs84 parameters, I've found http://www.mail-archive.com/gdal-...@lists.osgeo.org/msg02921.html and from there http://earth-info.nga.mil/GandG/coordsys/onlinedatum/CountryEuropeTable.html I'll test these values for my ED50, compare to

Re: [R-sig-Geo] Slope and Aspect calculations in R

2009-07-10 Thread Josh London
Thanks to everyone for the feedback. I may dabble around with SAGA/RSAGA on a linux box we have and also continue to watch for any MacOS builds. Roger, I am especially excited that spgrass6 has the initGRASS() function. by providing access to r.slope.aspect, I think that will be the

Re: [R-sig-Geo] rgdal pckg: Convert LL to UTM

2009-07-10 Thread Roger Bivand
On Fri, 10 Jul 2009, Steve Hong wrote: Dear List, Thanks again for answering my question. I was able to convert LL to UTM using 'rgdal' package. Below is the code I used. library(rgdal) my.data2 - read.delim(clipboard, header=T) my.data - SpatialPoints(my.data, proj4string=CRS(+proj=longlat