[GRASS-user] Re: Importing multiple files with r.in.xyz

2010-08-11 Thread Hanlie Pretorius
Thanks for the reply. I'll try that if I don't manage with the Linux version.

However, previously when I worked with the SVN version, I was advised
to rather use the stable version.

2010/8/10, Helmut Kudrnovsky hel...@web.de:
Hi,

I'm working with WinGRASS 6.4RC6 on Win XP
 [...]

 please try also the latest nightly builds of WinGrass64svn
 (http://josef.fsv.cvut.cz/wingrass/grass64/),
 because release candidate 6 of Grass64 is now a little bit outdated.

 best regards
 Helmut
 ___
 Neu: WEB.DE De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
 Jetzt De-Mail-Adresse reservieren: https://produkte.web.de/go/demail02

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


Re: [GRASS-user] Re: Importing multiple files with r.in.xyz

2010-08-11 Thread razmjooeis
Hanlie

You might find this useful:
http://www.surfaces.co.il/?p=578

It's in qgis, but still you can use GRASS plugin to interact with your
datasets.

Cheers
Saber


 Thanks for the reply. I'll try that if I don't manage with the Linux
 version.

 However, previously when I worked with the SVN version, I was advised
 to rather use the stable version.

 2010/8/10, Helmut Kudrnovsky hel...@web.de:
Hi,

I'm working with WinGRASS 6.4RC6 on Win XP
 [...]

 please try also the latest nightly builds of WinGrass64svn
 (http://josef.fsv.cvut.cz/wingrass/grass64/),
 because release candidate 6 of Grass64 is now a little bit outdated.

 best regards
 Helmut
 ___
 Neu: WEB.DE De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
 Jetzt De-Mail-Adresse reservieren: https://produkte.web.de/go/demail02

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



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


Re: [GRASS-user] Re: Importing multiple files with r.in.xyz

2010-08-11 Thread Hanlie Pretorius
Had a look at the article. Interesting process.

However, the TRMM rainfall data is already spatially distributed,
albeit at a coarse resolution (0.25 degrees).

2010/8/11, razmjoo...@faunalia.co.uk razmjoo...@faunalia.co.uk:
 Hanlie

 You might find this useful:
 http://www.surfaces.co.il/?p=578

 It's in qgis, but still you can use GRASS plugin to interact with your
 datasets.

 Cheers
 Saber


 Thanks for the reply. I'll try that if I don't manage with the Linux
 version.

 However, previously when I worked with the SVN version, I was advised
 to rather use the stable version.

 2010/8/10, Helmut Kudrnovsky hel...@web.de:
Hi,

I'm working with WinGRASS 6.4RC6 on Win XP
 [...]

 please try also the latest nightly builds of WinGrass64svn
 (http://josef.fsv.cvut.cz/wingrass/grass64/),
 because release candidate 6 of Grass64 is now a little bit outdated.

 best regards
 Helmut
 ___
 Neu: WEB.DE De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
 Jetzt De-Mail-Adresse reservieren: https://produkte.web.de/go/demail02

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




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


Re: [GRASS-user] Re: Importing multiple files with r.in.xyz

2010-08-11 Thread Micha Silver

Hello Hanlie:
First I must thank Saber for pointing you to my blog.

Regarding your r.in.xyz question, If you decide to make the jump to 
Linux, then the scripting capabilities in a bash shell will give you a 
real eye-opener. As others have mentioned, you can loop thru a whole 
directory of files and run a grass command for each with something like:


for infile in *.txt; do
# get the base name of the txt file without the .txt extension
# Note that the 2nd parameter for basename includes the dot '.'
outrast=`basename ${infile} .txt`
r.in.xyz -s in=${infile} fs=, out=${outrast}
done

I'm sure it's doable also in a windows cmd shell. And there are other 
ways to get the list of files into a loop. If you'd like to see a 
sample, check this older blog post:

http://www.surfaces.co.il/?p=241

Regards,
Micha



On 11/08/2010 12:16, razmjoo...@faunalia.co.uk wrote:

Hanlie

You might find this useful:
http://www.surfaces.co.il/?p=578

It's in qgis, but still you can use GRASS plugin to interact with your
datasets.

Cheers
Saber


   

Thanks for the reply. I'll try that if I don't manage with the Linux
version.

However, previously when I worked with the SVN version, I was advised
to rather use the stable version.

2010/8/10, Helmut Kudrnovskyhel...@web.de:
 

Hi,

I'm working with WinGRASS 6.4RC6 on Win XP
 

[...]

please try also the latest nightly builds of WinGrass64svn
(http://josef.fsv.cvut.cz/wingrass/grass64/),
because release candidate 6 of Grass64 is now a little bit outdated.

best regards
Helmut
___
Neu: WEB.DE De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
Jetzt De-Mail-Adresse reservieren: https://produkte.web.de/go/demail02

   

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

 


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

This mail was received via Mail-SeCure System.


   



--
Micha Silver
http://www.surfaces.co.il/
Arava Development Co.  +972-52-3665918

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


[GRASS-user] addons installation under GRASS 7.0-svn

2010-08-11 Thread Rhot

Hello!
I've got a problem with installing of any addon to grass 7.0-svn (Ubuntu 
9.10). Particularly, while installing module i.landsat.acca, I got the 
following errors.



r...@rhot-workstation:~/Dl/i.landsat.acca$ LANGUAGE=en.US.UTF-8 make 
MODULE_TOPDIR=/usr/local/grass-7.0.svn/
:  gcc 
-L/home/rhot/Dl/grass_svn/grass_trunk/dist.i686-pc-linux-gnu/lib 
-L/home/rhot/Dl/grass_svn/grass_trunk/dist.i686-pc-linux-gnu/lib 
-Wl,--export-dynamic 
-Wl,-rpath-link,/home/rhot/Dl/grass_svn/grass_trunk/dist.i686-pc-linux-gnu/lib   
-o 
/home/rhot/Dl/grass_svn/grass_trunk/dist.i686-pc-linux-gnu/bin/i.landsat.acca 
OBJ.i686-pc-linux-gnu/algorithm.o OBJ.i686-pc-linux-gnu/main.o 
OBJ.i686-pc-linux-gnu/tools.o-lgrass_gis.7.0.svn  -lm 
OBJ.i686-pc-linux-gnu/algorithm.o: In function `acca_second':
/home/rhot/Dl/i.landsat.acca/algorithm.c:361: undefined reference to 
`G_find_cell2'
/home/rhot/Dl/i.landsat.acca/algorithm.c:364: undefined reference to 
`G_allocate_raster_buf'
/home/rhot/Dl/i.landsat.acca/algorithm.c:365: undefined reference to 
`G_open_cell_old'
/home/rhot/Dl/i.landsat.acca/algorithm.c:370: undefined reference to 
`G_allocate_raster_buf'
/home/rhot/Dl/i.landsat.acca/algorithm.c:371: undefined reference to 
`G_open_raster_new'
/home/rhot/Dl/i.landsat.acca/algorithm.c:379: undefined reference to 
`G_window_rows'
/home/rhot/Dl/i.landsat.acca/algorithm.c:380: undefined reference to 
`G_window_cols'
/home/rhot/Dl/i.landsat.acca/algorithm.c:388: undefined reference to 
`G_get_d_raster_row'
/home/rhot/Dl/i.landsat.acca/algorithm.c:390: undefined reference to 
`G_get_c_raster_row'
/home/rhot/Dl/i.landsat.acca/algorithm.c:395: undefined reference to 
`G_is_c_null_value'
/home/rhot/Dl/i.landsat.acca/algorithm.c:409: undefined reference to 
`G_set_c_null_value'
/home/rhot/Dl/i.landsat.acca/algorithm.c:430: undefined reference to 
`G_put_raster_row'
/home/rhot/Dl/i.landsat.acca/algorithm.c:439: undefined reference to 
`G_close_cell'
/home/rhot/Dl/i.landsat.acca/algorithm.c:442: undefined reference to 
`G_close_cell'

OBJ.i686-pc-linux-gnu/algorithm.o: In function `acca_first':
/home/rhot/Dl/i.landsat.acca/algorithm.c:220: undefined reference to 
`G_allocate_raster_buf'
/home/rhot/Dl/i.landsat.acca/algorithm.c:221: undefined reference to 
`G_open_raster_new'
/home/rhot/Dl/i.landsat.acca/algorithm.c:232: undefined reference to 
`G_window_rows'
/home/rhot/Dl/i.landsat.acca/algorithm.c:233: undefined reference to 
`G_window_cols'
/home/rhot/Dl/i.landsat.acca/algorithm.c:243: undefined reference to 
`G_get_d_raster_row'
/home/rhot/Dl/i.landsat.acca/algorithm.c:252: undefined reference to 
`G_is_d_null_value'
/home/rhot/Dl/i.landsat.acca/algorithm.c:329: undefined reference to 
`G_set_c_null_value'
/home/rhot/Dl/i.landsat.acca/algorithm.c:336: undefined reference to 
`G_put_raster_row'
/home/rhot/Dl/i.landsat.acca/algorithm.c:344: undefined reference to 
`G_close_cell'

OBJ.i686-pc-linux-gnu/main.o: In function `check_raster':
/home/rhot/Dl/i.landsat.acca/main.c:56: undefined reference to 
`G_find_cell2'
/home/rhot/Dl/i.landsat.acca/main.c:65: undefined reference to 
`G_open_cell_old'
/home/rhot/Dl/i.landsat.acca/main.c:69: undefined reference to 
`G_get_cellhd'
/home/rhot/Dl/i.landsat.acca/main.c:77: undefined reference to 
`G_raster_map_type'

OBJ.i686-pc-linux-gnu/main.o: In function `main':
/home/rhot/Dl/i.landsat.acca/main.c:169: undefined reference to 
`G_allocate_raster_buf'
/home/rhot/Dl/i.landsat.acca/main.c:195: undefined reference to 
`G_close_cell'
/home/rhot/Dl/i.landsat.acca/main.c:202: undefined reference to 
`G_short_history'
/home/rhot/Dl/i.landsat.acca/main.c:203: undefined reference to 
`G_command_history'
/home/rhot/Dl/i.landsat.acca/main.c:204: undefined reference to 
`G_write_history'

OBJ.i686-pc-linux-gnu/tools.o: In function `pval':
/home/rhot/Dl/i.landsat.acca/tools.c:125: undefined reference to 
`G_is_c_null_value'

OBJ.i686-pc-linux-gnu/tools.o: In function `filter_holes':
/home/rhot/Dl/i.landsat.acca/tools.c:141: undefined reference to 
`G_window_rows'
/home/rhot/Dl/i.landsat.acca/tools.c:142: undefined reference to 
`G_window_cols'
/home/rhot/Dl/i.landsat.acca/tools.c:148: undefined reference to 
`G_find_cell2'
/home/rhot/Dl/i.landsat.acca/tools.c:151: undefined reference to 
`G_allocate_raster_buf'
/home/rhot/Dl/i.landsat.acca/tools.c:152: undefined reference to 
`G_allocate_raster_buf'
/home/rhot/Dl/i.landsat.acca/tools.c:153: undefined reference to 
`G_allocate_raster_buf'
/home/rhot/Dl/i.landsat.acca/tools.c:154: undefined reference to 
`G_open_cell_old'
/home/rhot/Dl/i.landsat.acca/tools.c:159: undefined reference to 
`G_allocate_raster_buf'
/home/rhot/Dl/i.landsat.acca/tools.c:160: undefined reference to 
`G_open_raster_new'
/home/rhot/Dl/i.landsat.acca/tools.c:175: undefined reference to 
`G_get_c_raster_row'
/home/rhot/Dl/i.landsat.acca/tools.c:178: undefined reference to 
`G_get_c_raster_row'
/home/rhot/Dl/i.landsat.acca/tools.c:184: undefined reference to 
`G_get_c_raster_row'

Re: [GRASS-user] addons installation under GRASS 7.0-svn

2010-08-11 Thread Martin Landa
Hi,

2010/8/11 Rhot r...@rambler.ru:
 Hello!
 I've got a problem with installing of any addon to grass 7.0-svn (Ubuntu
 9.10). Particularly, while installing module i.landsat.acca, I got the
 following errors.

you need to update the code to use raster library which has been
introduced in GRASS 7 a few months ago [1].

Martin

[1] http://trac.osgeo.org/grass/wiki/Grass7/RasterLib

-- 
Martin Landa landa.martin gmail.com * http://gama.fsv.cvut.cz/~landa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Scripts interface without optional tab

2010-08-11 Thread Nikos Dumakis
Greetings

I have created a Python Script and defined only required parameters so no
optionals but, it's still created a Optional tab with Verbose module
output and Quiet module output.
Is it possible to have scripts without these parameters? Another question:
What is difference between Verbose module output off and Quiet module
output ON?
Thanks
Nikos
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Importing multiple files with r.in.xyz

2010-08-11 Thread Hanlie Pretorius
My apologies for my ignorance, but how do I get this to run in Linux?
Am using Ubuntu 10.04 and GRASS 6.4RC6.

I entered the following into the GRASS text window and am testing it
with a list of two files (I removed the region settings because the
files all have the same region, which I have already set):
-
GRASS 6.4.0RC6 (world_wgs84):~  cat lieb_files_test.txt
3B42.000201.12.6.nc.lieb.txt
3B42.000201.15.6.nc.lieb.txt
GRASS 6.4.0RC6 (world_wgs84):~  cat lieb_files_test.txt | while read line; do
  echo $line+ being processed
 raster=${$line:(-12)} # cut .nc.lieb.txt from raster name
 r.in.xyz --overwrite input=$line output=raster method=mean type=FCELL 
 fs=, x=2 y=1 z=3

-

As you can see, when I press enter after the r.in.xyz line, I just get
another prompt.

Am I supposed to save it to a separate file and run this as a script?
If so, where should I put this script?


2010/8/10, Saber Razmjooei razmjoo...@faunalia.co.uk:

 cat list_of_files.txt | while read line; do
 echo $line+Being processed # or whaterver you want to do with the
 $line variable
  raster=$line
  r.in.xyz -s -g input=$line output=$line  tmpRegion
 myregion= `head -n 1 tmpRegion`
 g.region $myregion
 r.in.xyz --overwrite input=$line output=$line fs=,
 done

 and your list_of_files.txt is
 raster1
 raster2
 .

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


Re: [GRASS-user] Importing multiple files with r.in.xyz

2010-08-11 Thread Vincent Bain
Hi, short intrusion in this current thread, without knowing exactly what
it is related to : I only mean to suggest you to close the while loop...

This prompt  means the shell expects the end of your statement ; here
you should type done to close the while instruction.

Hope it helps,
Regards.

Vincent


Le mercredi 11 août 2010 à 14:10 +0200, Hanlie Pretorius a écrit :
 My apologies for my ignorance, but how do I get this to run in Linux?
 Am using Ubuntu 10.04 and GRASS 6.4RC6.
 
 I entered the following into the GRASS text window and am testing it
 with a list of two files (I removed the region settings because the
 files all have the same region, which I have already set):
 -
 GRASS 6.4.0RC6 (world_wgs84):~  cat lieb_files_test.txt
 3B42.000201.12.6.nc.lieb.txt
 3B42.000201.15.6.nc.lieb.txt
 GRASS 6.4.0RC6 (world_wgs84):~  cat lieb_files_test.txt | while read line; do
   echo $line+ being processed
  raster=${$line:(-12)} # cut .nc.lieb.txt from raster name
  r.in.xyz --overwrite input=$line output=raster method=mean type=FCELL 
  fs=, x=2 y=1 z=3
 
 -
 
 As you can see, when I press enter after the r.in.xyz line, I just get
 another prompt.
 
 Am I supposed to save it to a separate file and run this as a script?
 If so, where should I put this script?
 
 
 2010/8/10, Saber Razmjooei razmjoo...@faunalia.co.uk:
 
  cat list_of_files.txt | while read line; do
  echo $line+Being processed # or whaterver you want to do with the
  $line variable
   raster=$line
   r.in.xyz -s -g input=$line output=$line  tmpRegion
  myregion= `head -n 1 tmpRegion`
  g.region $myregion
  r.in.xyz --overwrite input=$line output=$line fs=,
  done
 
  and your list_of_files.txt is
  raster1
  raster2
  .
 
  Hope that helps
  Saber
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user
 


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


Re: [GRASS-user] Importing multiple files with r.in.xyz

2010-08-11 Thread Micha Silver

 On 08/11/2010 03:10 PM, Hanlie Pretorius wrote:

My apologies for my ignorance, but how do I get this to run in Linux?
Am using Ubuntu 10.04 and GRASS 6.4RC6.

Samber's method will surely work, but you might more simply try as follows:

# start grass in a location which matches the txt file data
# change to the directory where your txt files are, then do
for infile in *.txt; do outrast=`basename ${infile} .txt`; r.in.xyz 
in=${infile} out=${outrast} fs=,; done


# that's it ;-)
 --
Micha



I entered the following into the GRASS text window and am testing it
with a list of two files (I removed the region settings because the
files all have the same region, which I have already set):
-
GRASS 6.4.0RC6 (world_wgs84):~  cat lieb_files_test.txt
3B42.000201.12.6.nc.lieb.txt
3B42.000201.15.6.nc.lieb.txt
GRASS 6.4.0RC6 (world_wgs84):~  cat lieb_files_test.txt | while read line; do

  echo $line+ being processed
raster=${$line:(-12)} # cut .nc.lieb.txt from raster name
r.in.xyz --overwrite input=$line output=raster method=mean type=FCELL fs=, 
x=2 y=1 z=3


-

As you can see, when I press enter after the r.in.xyz line, I just get
another prompt.

Am I supposed to save it to a separate file and run this as a script?
If so, where should I put this script?


2010/8/10, Saber Razmjooeirazmjoo...@faunalia.co.uk:

cat list_of_files.txt | while read line; do
 echo $line+Being processed # or whaterver you want to do with the
$line variable
  raster=$line
  r.in.xyz -s -g input=$line output=$line  tmpRegion
myregion= `head -n 1 tmpRegion`
g.region $myregion
r.in.xyz --overwrite input=$line output=$line fs=,
done

and your list_of_files.txt is
raster1
raster2
.

Hope that helps
Saber

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

This mail was received via Mail-SeCure System.




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


Re: [GRASS-user] Importing multiple files with r.in.xyz

2010-08-11 Thread Micha Silver

 On 08/11/2010 03:32 PM, Micha Silver wrote:

 On 08/11/2010 03:10 PM, Hanlie Pretorius wrote:

My apologies for my ignorance, but how do I get this to run in Linux?
Am using Ubuntu 10.04 and GRASS 6.4RC6.
Samber's method will surely work, but you might more simply try as 
follows:


# start grass in a location which matches the txt file data
# change to the directory where your txt files are, then do
for infile in *.txt; do outrast=`basename ${infile} .txt`; r.in.xyz 
in=${infile} out=${outrast} fs=,; done


Oops- I forgot the x=2 y=1 z=3 parameters. Add those to the grass 
command also...

# that's it ;-)
 --
Micha



I entered the following into the GRASS text window and am testing it
with a list of two files (I removed the region settings because the
files all have the same region, which I have already set):
-
GRASS 6.4.0RC6 (world_wgs84):~  cat lieb_files_test.txt
3B42.000201.12.6.nc.lieb.txt
3B42.000201.15.6.nc.lieb.txt
GRASS 6.4.0RC6 (world_wgs84):~  cat lieb_files_test.txt | while read 
line; do

  echo $line+ being processed
raster=${$line:(-12)} # cut .nc.lieb.txt from raster name
r.in.xyz --overwrite input=$line output=raster method=mean 
type=FCELL fs=, x=2 y=1 z=3



-

As you can see, when I press enter after the r.in.xyz line, I just get
another prompt.

Am I supposed to save it to a separate file and run this as a script?
If so, where should I put this script?


2010/8/10, Saber Razmjooeirazmjoo...@faunalia.co.uk:

cat list_of_files.txt | while read line; do
 echo $line+Being processed # or whaterver you want to do with 
the

$line variable
  raster=$line
  r.in.xyz -s -g input=$line output=$line  tmpRegion
myregion= `head -n 1 tmpRegion`
g.region $myregion
r.in.xyz --overwrite input=$line output=$line fs=,
done

and your list_of_files.txt is
raster1
raster2
.

Hope that helps
Saber

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

This mail was received via Mail-SeCure System.




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

This mail was received via Mail-SeCure System.




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


Re: [GRASS-user] Importing multiple files with r.in.xyz

2010-08-11 Thread Hanlie Pretorius
2010/8/11, Vincent Bain b...@toraval.fr:
 Hi, short intrusion in this current thread, without knowing exactly what
 it is related to : I only mean to suggest you to close the while loop...

 This prompt  means the shell expects the end of your statement ; here
 you should type done to close the while instruction.

Adding 'done' worked and I got the script running from the command line.

Thanks to everyone who chipped in.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Importing multiple files with r.in.xyz

2010-08-11 Thread razmjooeis
Open gedit (from Accessories) and copy paste the the commands into it.
Save the file to the same location as your raster and your files.txt file
call it import_xyz.sh

Now, open grass from terminal
Once in grass environment...change directory to your file
sh import_xyz.sh

Cheers
Saber



   On 08/11/2010 03:10 PM, Hanlie Pretorius wrote:
 My apologies for my ignorance, but how do I get this to run in Linux?
 Am using Ubuntu 10.04 and GRASS 6.4RC6.
 Samber's method will surely work, but you might more simply try as
 follows:

 # start grass in a location which matches the txt file data
 # change to the directory where your txt files are, then do
 for infile in *.txt; do outrast=`basename ${infile} .txt`; r.in.xyz
 in=${infile} out=${outrast} fs=,; done

 # that's it ;-)
   --
 Micha


 I entered the following into the GRASS text window and am testing it
 with a list of two files (I removed the region settings because the
 files all have the same region, which I have already set):
 -
 GRASS 6.4.0RC6 (world_wgs84):~  cat lieb_files_test.txt
 3B42.000201.12.6.nc.lieb.txt
 3B42.000201.15.6.nc.lieb.txt
 GRASS 6.4.0RC6 (world_wgs84):~  cat lieb_files_test.txt | while read
 line; do
   echo $line+ being processed
 raster=${$line:(-12)} # cut .nc.lieb.txt from raster name
 r.in.xyz --overwrite input=$line output=raster method=mean
 type=FCELL fs=, x=2 y=1 z=3

 -

 As you can see, when I press enter after the r.in.xyz line, I just get
 another prompt.

 Am I supposed to save it to a separate file and run this as a script?
 If so, where should I put this script?


 2010/8/10, Saber Razmjooeirazmjoo...@faunalia.co.uk:
 cat list_of_files.txt | while read line; do
  echo $line+Being processed # or whaterver you want to do with
 the
 $line variable
   raster=$line
   r.in.xyz -s -g input=$line output=$line  tmpRegion
 myregion= `head -n 1 tmpRegion`
 g.region $myregion
 r.in.xyz --overwrite input=$line output=$line fs=,
 done

 and your list_of_files.txt is
 raster1
 raster2
 .

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

 This mail was received via Mail-SeCure System.






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


Re: [GRASS-user] addons installation under GRASS 7.0-svn

2010-08-11 Thread Rhot

Martin Landa пишет:

Hi,

2010/8/11 Rhot r...@rambler.ru:
  

Hello!
I've got a problem with installing of any addon to grass 7.0-svn (Ubuntu
9.10). Particularly, while installing module i.landsat.acca, I got the
following errors.



you need to update the code to use raster library which has been
introduced in GRASS 7 a few months ago [1].

Martin

[1] http://trac.osgeo.org/grass/wiki/Grass7/RasterLib

  
Maybe you mean 'to update the code of the module'?? But how? I am not a 
programmer. I'm just a GIS specialist trying to use newest grass-7.0 
with addons written for grass-6.x as grass-wiki says.


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


Re: [GRASS-user] Importing multiple files with r.in.xyz

2010-08-11 Thread Hanlie Pretorius
2010/8/11, Micha Silver mi...@arava.co.il:
 Samber's method will surely work, but you might more simply try as follows:

 # start grass in a location which matches the txt file data
 # change to the directory where your txt files are, then do
 for infile in *.txt; do outrast=`basename ${infile} .txt`; r.in.xyz
 in=${infile} out=${outrast} fs=,; done

This works nicely, except that my input files have names like:
3B42.000201.0.6.nc.lieb.txt
3B42.000201.3.6.nc.lieb.txt

and I want the output rasters to be named
3B42.000201.0.6
3B42.000201.3.6

In fact, it would be best if they could be named:
0201.0.6
0201.3.6

I'm struggling with this string manipulation in the shell scripting language.



 # that's it ;-)
   --
 Micha
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Importing multiple files with r.in.xyz

2010-08-11 Thread Nikos Alexandris
Micha Silver mi...@arava.co.il:
  Samber's method will surely work, but you might more simply try as
  follows:
  
  # start grass in a location which matches the txt file data
  # change to the directory where your txt files are, then do
  for infile in *.txt; do outrast=`basename ${infile} .txt`; r.in.xyz
  in=${infile} out=${outrast} fs=,; done

Hanlie Pretorius wrote: 
 This works nicely, except that my input files have names like:
 3B42.000201.0.6.nc.lieb.txt
 3B42.000201.3.6.nc.lieb.txt
 
 and I want the output rasters to be named
 3B42.000201.0.6
 3B42.000201.3.6
 
 In fact, it would be best if they could be named:
 0201.0.6
 0201.3.6
 
 I'm struggling with this string manipulation in the shell scripting
 language.

Try the following (note the backticks in the beginning before echo and in 
the end as well):

output=`echo ${infile} | cut -d. -f2,3,4 | sed 's/^00//'`

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


Re: [GRASS-user] Importing multiple files with r.in.xyz

2010-08-11 Thread Hanlie Pretorius
2010/8/11, Nikos Alexandris nikos.alexand...@felis.uni-freiburg.de:
 Micha Silver mi...@arava.co.il:
  Samber's method will surely work, but you might more simply try as
  follows:
 
  # start grass in a location which matches the txt file data
  # change to the directory where your txt files are, then do
  for infile in *.txt; do outrast=`basename ${infile} .txt`; r.in.xyz
  in=${infile} out=${outrast} fs=,; done

 Hanlie Pretorius wrote:
 This works nicely, except that my input files have names like:
 3B42.000201.0.6.nc.lieb.txt
 3B42.000201.3.6.nc.lieb.txt

 and I want the output rasters to be named
 3B42.000201.0.6
 3B42.000201.3.6

 In fact, it would be best if they could be named:
 0201.0.6
 0201.3.6

 I'm struggling with this string manipulation in the shell scripting
 language.

 Try the following (note the backticks in the beginning before echo and in
 the end as well):

 output=`echo ${infile} | cut -d. -f2,3,4 | sed 's/^00//'`

Yes, this worked :-) Thanks.


 Nikos

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


[GRASS-user] Re: Importing multiple files with r.in.xyz

2010-08-11 Thread Hermann Peifer

On 11/08/2010 15:07, Hanlie Pretorius wrote:


This works nicely, except that my input files have names like:
3B42.000201.0.6.nc.lieb.txt
3B42.000201.3.6.nc.lieb.txt

and I want the output rasters to be named
3B42.000201.0.6
3B42.000201.3.6

In fact, it would be best if they could be named:
0201.0.6
0201.3.6

I'm struggling with this string manipulation in the shell scripting language.




In bash, you could do:

for infile in *.txt ; do r.in.xyz in=${infile} out=${infile:7:8} ... ; done

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


[GRASS-user] GRASS compiled from source: child_exception

2010-08-11 Thread LeeDaniel

Hi all,

I've got another problem again. Since I had so much trouble with getting
g.extension to work and never managed to get the add-on I desperately need
to compile (r.area), I'm trying it now with GRASS compiled from source. I
tried GRASS 7 and now I've tried GRASS 6.5, both with the same results.

I'm running OpenSUSE 11.3, 32 bit. Since the problem's been the same with 7
and 6.5, I'll show the more recent terminal outputs from 6.5.

Installed the latest 6.5-svn code from
http://grass.itc.it/grass65/binary/linux/snapshot/. Here's how I did it:
- Downloaded grass-6.5.svn-x86_64-unknown-linux-gnu-07_08_2010-install.sh
and grass-6.5.svn-x86_64-unknown-linux-gnu-07_08_2010.tar.gz into the same
directory
- Ran 
sudo sh grass-6.5.svn-x86_64-unknown-linux-gnu-07_08_2010-install.sh
grass-6.5.svn-x86_64-unknown-linux-gnu-07_08_2010.tar.gz

GRASS installed itself with the following output:
GRASS GIS 6.5.svn-x86_64-unknown-linux-gnu-07_08_2010 binary package
installation tool

Using gunzip decompressor...
The package grass-6.5.svn-x86_64-unknown-linux-gnu-07_08_2010.tar.gz seems
to be o.k.
 Proceeding...

Checking and creating installation directory...
Installing GRASS binaries into
/usr/local/grass6.5.svn-x86_64-unknown-linux-gnu-07_08_2010

Uncompressing the package and extracting to target directory...
Creating start script:
/usr/local/bin/grass65 -
/usr/local/bin/grass-6.5.svn-x86_64-unknown-linux-gnu-07_08_2010
Creating the locks directory for monitors...

Creating datum transformation gridshift files...

Generating display font configuration file...
grass-6.5.svn-x86_64-unknown-linux-gnu-07_08_2010-install.sh: line 344:
/usr/local/grass6.5.svn-x86_64-unknown-linux-gnu-07_08_2010/bin/g.mkfontcap:
cannot execute binary file

Installation finished. Start GRASS
6.5.svn-x86_64-unknown-linux-gnu-07_08_2010 with
/usr/local/bin/grass65


 
Welcome to GRASS GIS. Enjoy this open source GRASS GIS!

So far so good, although the inability to execute g.mkfontcap did worry me.

Then I started GRASS with the command grass65 and got the following output:
l...@pc19392:~/Downloads grass65   
  

 
WELCOME TO GRASS  Version 6.5.svn 2010  
 

 
   1) Have at your side all available GRASS tutorials   
 

 
   2) When working on your location, the following materials
 
  are extremely useful: 
 
  - A topo map of your area 
 
  - Current catalog of available computer maps  
 

 
   3) Check the GRASS webpages for feedback mailinglists and more:  
 
  http://www.grass-gis.org  
 
  http://grass.osgeo.org
 

 
Hit RETURN to continue  
 

 
Starting GRASS ...  
 
Traceback (most recent call last):  
 
  File
/usr/local/grass6.5.svn-x86_64-unknown-linux-gnu-07_08_2010/etc/wxpython/gis_set.py,
line 37, in module   
import gui_modules.goutput  

[GRASS-user] Re: GRASS compiled from source: child_exception

2010-08-11 Thread LeeDaniel

Hi there,

Alright, I think I figured out the problem: I've got a 32-bit system and not
a 64-bit one. My mistake.

Now I'm back to the old problem, though. I really need r.area because I'm
working with python and don't want to pipe awk commands through r.stats in
order to find out the area of my homogeneous areas and then have to
eliminate them with r.reclass. When I try to install r.area with g.extension
(put GRASS 6.4 back on my machine) I get the following problem in GRASS:

g.extension extension=r.area
svnurl=https://svn.osgeo.org/grass/grass-addons/ prefix=${GISBASE}
Fetching r.area from GRASS-Addons SVN (be patient)...
Ar.area/main.c
Ar.area/description.html
Ar.area/Makefile
Checked out revision 43042.
mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/bin.i686-pc-linux-gnu
mkdir -p
/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include/grass
mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/lib
mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/bin
mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/etc
mkdir -p
/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/driver
Compiling r.area...
main.c:19:23: fatal error: grass/gis.h: No such file or
directory
compilation terminated.
make: *** [OBJ.i686-pc-linux-gnu/main.o] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.
mkdir -p
/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/driver/db
mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/fonts
test -d OBJ.i686-pc-linux-gnu || mkdir -p OBJ.i686-pc-linux-gnu
gcc -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include 
-O2   -DPACKAGE=\grassmods\ 
-I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -o
OBJ.i686-pc-linux-gnu/main.o -c main.c

If I try to compile it in a folder after changing the makefile's
MODULE_TOPDIR to point to /opt/grass/ I get the following error:
test -d OBJ.i686-pc-linux-gnu || mkdir -p OBJ.i686-pc-linux-gnu
gcc -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include 
-O2   -DPACKAGE=\grassmods\ 
-I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -o
OBJ.i686-pc-linux-gnu/main.o -c main.c
main.c:19:23: fatal error: grass/gis.h: No such file or directory
compilation terminated.
make: *** [OBJ.i686-pc-linux-gnu/main.o] Error 1

Does anybody know of a solution or any way to come further?
Thanks,
Daniel
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/GRASS-compiled-from-source-child-exception-tp5412414p5412721.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Missing database drivers

2010-08-11 Thread razmjooeis
Have you used your linux distro to install grass (apt, yum, emerge, etc)?
You can always compile GRASS with sqlite option:

http://grass.osgeo.org/wiki/Compile_and_Install
http://grass.osgeo.org/wiki/Compile_and_Install#Prerequisites

Cheers
Saber


 I am reading Open Source GIS, and the authors recommend using SQLite.
 When I type

 Db.drivers -p

 I get

   Dbf

   Ogr

 (These should be all small letters, but my email has auto-correct turned
 on, and it keeps changing the starting letters to upper case.)



 How does on load new database drivers?  I am using GRASS 6.4 on a Linux
 64 system.



 Thanks!



Tim



 ***



 Timothy S. Thomas

 Research Fellow, International Food Policy Research Institute (IFPRI)

 2033 K St. NW, Washington, DC 20006-1002 (Room 5035)

 t.s.tho...@cgiar.org www.ifpri.org

 (w) +1-202-862-4605 (f) +1-202-467-4439

 skype: timothy.s.thomas



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



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