[GRASS-user] Re: Error using r.mapcalc

2010-06-23 Thread Pedro Roma
I have sent this email to the mailing list but I obtained no asnswers. Can
anyone please help me?

On Tue, Jun 15, 2010 at 6:30 PM, Pedro Roma pedroroma1...@gmail.com wrote:

 Hi

 I tried to use r.mapcalc in my GRASS6.4.RC5 in Linux and I got this error
 at terminal:
 syntax error, unexpected '-', expecting NAME or STRING
 Parse error

 And the following in command output window:
 Traceback (most recent call last):
   File /usr/local/grass-6.4.0svn/etc/wxpython/wxgui.py,
 line 473, in OnRunCmd

 self.goutput.RunCmd(cmd, switchPage=False)
   File /usr/local/grass-6.4.0svn/etc/wxpython/gui_modules/g
 output.py, line 354, in RunCmd

 menuform.GUI().ParseCommand(cmdlist, parentframe=self)
   File /usr/local/grass-6.4.0svn/etc/wxpython/gui_modules/m
 enuform.py, line 1828, in ParseCommand

 xml.sax.parseString(getInterfaceDescription(cmd[0]),
   File /usr/local/grass-6.4.0svn/etc/wxpython/gui_modules/m
 enuform.py, line 1764, in getInterfaceDescription

 raise IOError, _(Unable to fetch interface description for
 command '%s'.) % cmd
 IOError
 :
 Unable to fetch interface description for command
 'r.mapcalc'.


 Then I runned r.mapcalc at my GRASS OSGEO4w installation and I got the
 following error:
 Traceback (most recent call last):
   File C:/osgeo4w/apps/grass/grass-6.4.0svn/etc/wxpython/wx
 gui.py, line 473, in OnRunCmd

 self.goutput.RunCmd(cmd, switchPage=False)
   File C:\osgeo4w\apps\grass\grass-6.4.0svn\etc\wxpython\gu
 i_modules\goutput.py, line 354, in RunCmd

 menuform.GUI().ParseCommand(cmdlist, parentframe=self)
   File C:\osgeo4w\apps\grass\grass-6.4.0svn\etc\wxpython\gu
 i_modules\menuform.py, line 1863, in ParseCommand

 xml.sax.parseString(getInterfaceDescription(cmd[0]).decode(e
 nc).split('\n',1)[1].replace('', '?xml version=1.0
 encoding=utf-8?\n', 1).encode(utf-8),
   File C:\osgeo4w\apps\grass\grass-6.4.0svn\etc\wxpython\gu
 i_modules\menuform.py, line 1802, in
 getInterfaceDescription

 raise IOError, _(Unable to fetch interface description for
 command '%s'.) % cmd
 IOError
 :
 Unable to fetch interface description for command
 'r.mapcalc'.

 From http://grass.itc.it/grass64/binary/mswindows/native/ I installed
 WinGRASS6.4RC6-1 and I got exacly the same error.

 Can anyone tell me if this is expected to happen? or if there is some sort
 of fix for this?

 Thanks

 Best regards,
 Pedro


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


[GRASS-user] Converting raster to point-vector- Question

2010-06-23 Thread Jenny Turner
Hi there

I have a few training areas, in raster format, that I have used for
Clasification (i.maxlik). Thuis means that  pixels have  information like
this:
633376.703089|222904.095941||9|Category 9
or
642250.637155|224541.035235||10|Category 10

I i convert using this expression:
r.to.vect input=lsa7_trainin...@landsat output=points00 feature=point

but with this method my cat number corresponds to an Id instead of category.
What I need is to have cat = to value category. How can I change ths?

Thanks

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


Re: [GRASS-user] Batch import

2010-06-23 Thread Nikos Alexandris
(please keep this on-list)
 
Shaun Langley wrote:
  I am trying to import several hundred images into Grass. This is
  obviously painful to do by hand. I've tried searching for batch scripts
  but haven't found one. Can anyone help?

Nikos Alexandris:
  Linux or Window$?

Shaun Langley:
 Mac or Linux

You can use bash (the well known shell under most Linux distros) one-liners or 
script(s). Something like:

# enter in the directory which holds the images
# assuming all are Geotiff and lie on the same spatial reference system
cd Directory

# use r.in.gdal within a for loop
for TIF in *.tif; do r.in.gdal in=${TIF} out=${TIF} ; done

# or to avoid the .tif in the name of the imported grass
for TIF in *.tif ; do r.in.gdal in=${TIF} out=`echo ${TIF} | cut -d. -
f1` ; done

Under the GUI I have no idea (currently).

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