[GRASS-user] Re: GRASS & R : g.region command not found

2009-04-06 Thread Roger Bivand
Milton Cezar Ribeiro  gmail.com> writes:

> 
> 
> Dear all,
>  
> I am running grass65 under MSYS under Vista.
> After launch MSYS  / GRASS / R, I get the information about
> mapset without problem. But as my raster image are very large,
> R can support the file. 
>  
> But when I try run system("g.region ...") I get error on R.
> May be R can't get the PATH where the g.region command are.
>  

You must add .exe to compiled commands, and .bat to scripts.

Wait for a forthcoming 0.6-* series spgrass6, which will automate some of 
this.

For questions like this, do use the statgrass list.

Roger

PS.

Don't use Windows if you need to do real work - there are so many binary GRASS 
versions that interfacing them all is a nightmare (see the pain on OSGEO4W)!


___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Re: GRASS & R : g.region command not found

2009-04-06 Thread Milton Cezar Ribeiro
Oops, I forgot some important information:

=By GRASS side
> set
!::='::\'
!C:='C:\'
ALLUSERSPROFILE='C:\ProgramData'
APPDATA='C:\Users\famiglia\AppData\Roaming'
ARCGISHOME='C:\Program Files (x86)\ArcGIS\'
BASH=/bin/sh
BASH_VERSINFO=([0]="2" [1]="04" [2]="0" [3]="1" [4]="release"
[5]="i686-pc-msys")
BASH_VERSION='2.04.0(1)-release'
BGCOLOR=LightYellow
COLORFGBG='default;default'
COLORTERM=rxvt
COLUMNS=82
COMMONPROGRAMFILES='C:\Program Files (x86)\Common Files'
COMMONPROGRAMFILES(X86)='C:\Program Files (x86)\Common Files'
COMMONPROGRAMW6432='C:\Program Files\Common Files'
COMPUTERNAME=FAMIGLIA-PC
COMSPEC='C:\Windows\SysWOW64\cmd.exe'
DFSTRACINGON=FALSE
DIRSTACK=()
DISPLAY=:0
EUID=500
FGCOLOR=Navy
FP_NO_HOST_CHECK=NO
GISBASE=/c/OSGeo4W/apps/grass/grass-6.5.svn
GISRC=/tmp/grass6-famiglia-8108/gisrc
GIS_LOCK=8108
GRASS_GNUPLOT='gnuplot -persist'
GRASS_HTML_BROWSER='C:/Program Files/Internet Explorer/iexplore.exe'
GRASS_LD_LIBRARY_PATH='/c/OSGeo4W/apps/grass/grass-6.5.svn/lib:/c/OSGeo4W/apps/grass/grass-6.5.svn/bin:/c/OSGeo4W/apps/grass/grass-6.5.svn/scripts:/c/OSGeo4W/bin:.:/usr/local/bin:/mingw/bin:/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Program
Files (x86)/ATI Technologies/ATI.ACE/Core-Static'
GRASS_PAGER=less
GRASS_PERL=no
GRASS_PROJSHARE=/c/OSGeo4W/share/proj
GRASS_PYTHON=python
GRASS_SH=/bin/sh
GRASS_TCLSH=tclsh
GRASS_VERSION=6.5.svn
GRASS_WISH=wish
GROUPS=()
HISTFILE=/home/famiglia/.bash_history
HISTFILESIZE=500
HISTSIZE=500
HOME=/home/famiglia
HOMEDRIVE=C:
HOMEPATH='\'
HOSTNAME=FAMIGLIA-PC
HOSTTYPE=i686
IFS='
'
LINES=31
LOCALAPPDATA='C:\Users\famiglia\AppData\Local'
LOGNAME=famiglia
LOGONSERVER='\\FAMIGLIA-PC'
MACHTYPE=i686-pc-msys
MAILCHECK=60
MAKE_MODE=unix
MINGW32BGCOLOR=LightYellow
MINGW32FGCOLOR=Navy
MSYSBGCOLOR=White
MSYSCON=rxvt.exe
MSYSFGCOLOR=Black
MSYSTEM=MINGW32
NUMBER_OF_PROCESSORS=4
OPTERR=1
OPTIND=1
OS=Windows_NT
OSTYPE=msys
PATH='/c/OSGeo4W/apps/grass/grass-6.5.svn/lib:/c/OSGeo4W/apps/grass/grass-6.5.svn/bin:/c/OSGeo4W/apps/grass/grass-6.5.svn/scripts:/c/OSGeo4W/bin:.:/usr/local/bin:/mingw/bin:/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Program
Files (x86)/ATI Technologies/ATI.ACE/Core-Static'
PATHEXT='.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'
PIPESTATUS=([0]="0")
PPID=8108
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_ARCHITEW6432=AMD64
PROCESSOR_IDENTIFIER='Intel64 Family 6 Model 23 Stepping 10, GenuineIntel'
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=170a
PROGRAMDATA='C:\ProgramData'
PROGRAMFILES='C:\Program Files (x86)'
PROGRAMFILES(X86)='C:\Program Files (x86)'
PROGRAMW6432='C:\Program Files'
PROMPT='$P$G'
PS1='GRASS 6.5.svn (newLocation):\w > '
PS2='> '
PS4='+ '
PUBLIC='C:\Users\Public'
PWD=C:/OSGeo4W/apps/msys/home/famiglia
PYTHONPATH='/c/OSGeo4W/apps/grass/grass-6.5.svn/etc/python:C:\Program Files
(x86)\ArcGIS\bin'
SESSIONNAME=Console
SHELL=/bin/sh
SHELLOPTS=braceexpand:hashall:histexpand:monitor:history:interactive-comments:emacs
SHLVL=3
SYSTEMDRIVE=C:
SYSTEMROOT='C:\Windows'
TEMP=/tmp
TERM=msys
TMP=/tmp
TRACE_FORMAT_SEARCH_PATH='\\NTREL202.ntdev.corp.microsoft.com
\34FB5F65-FFEB-4B61-BF0E-A6A76C450FAA\TraceFormat'
UID=500
USERDOMAIN=famiglia-PC
USERNAME=famiglia
USERPROFILE='C:\Users\famiglia'
WD='C:\OSGeo4W\apps\msys\\bin\'
WINDIR='C:\Windows'
WINDOWID=167838920
_=-p

 =By R(spgrass6) side
> sessionInfo()
R version 2.9.0 alpha (2009-03-26 r48224)
i386-pc-mingw32
locale:
LC_COLLATE=English_Canada.1252;LC_CTYPE=English_Canada.1252;LC_MONETARY=English_Canada.1252;LC_NUMERIC=C;LC_TIME=English_Canada.1252
attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base
other attached packages:
[1] spgrass6_0.5-18 raster_0.8.9-6  maptools_0.7-20 foreign_0.8-34
[5] rgdal_0.6-7 sp_0.9-32
loaded via a namespace (and not attached):
[1] grid_2.9.0  lattice_0.17-20

2009/4/6 Milton Cezar Ribeiro 

> Dear all,
>
> I am running grass65 under MSYS under Vista.
> After launch MSYS  / GRASS / R, I get the information about
> mapset without problem. But as my raster image are very large,
> R can support the file. So I decided to change the
> extent of the GRASS project using
> R to control the new extent (in fact I have reasons to
> do so from R).
>
> But when I try run system("g.region ...") I get error on R.
> May be R can't get the PATH where the g.region command are.
>
> ---
> > require(rgdal)
> > require(sp)
> > require(maptools)
> > require(raster)
> > require(spgrass6)
> >
> > gmeta6()
> gisdbaseJ:/HDExt/cNEC/AnaliseJuruena05_abril2009/juruena_grass_sdb
> locationnewLocation
> mapset  PERMANENT
> rows14178
> columns 8710
> north   9217368
> south   8366688
> west160765
> east683365
> nsres   60
> ewres   60
> projection  +proj=utm +south +no_defs +zone=21 +a=6378160 +rf=298.25
> +to_meter=1
>
> > reser.bbox<-bbox(reser)
> > reser.bbox
>   min   max
> x  371035  465139.4
> y 8764093 8833845.3
> > reser.