[GRASSLIST:2788] error using batch-grass.sh

hi all,
I want to use GRASS commands in a my shell script, I
tried to use of batch-grass.sh:

./batch-grass.sh Tehran_2 root g.list type=rast

but I get this error:

./batch-grass.sh: line 61: g.list: command not found

I don't know if I should run grass at first and then
use of this script or not?

In this case(run the script in the grass env, I give
this error:

ERROR: program 'g.list' cannot be executed because:
Neither a command line (cmd) or interactive (inter)
version was found

Would you please help me to solve it?

Regards

__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools

Maybe, if you post the script here we can look and see
what is wrong with it...

Cheers

Daniel
--- Maliheh <malihehs@yahoo.com> wrote:

hi all,
I want to use GRASS commands in a my shell script, I
tried to use of batch-grass.sh:

./batch-grass.sh Tehran_2 root g.list type=rast

but I get this error:

./batch-grass.sh: line 61: g.list: command not found

I don't know if I should run grass at first and then
use of this script or not?

In this case(run the script in the grass env, I give
this error:

ERROR: program 'g.list' cannot be executed because:
Neither a command line (cmd) or interactive (inter)
version was found

Would you please help me to solve it?

Regards

__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools

__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools

Maybe, if you post the script here we can look and
see
what is wrong with it...

Cheers

Daniel

Hello Daniel,
Thanks for your response, "batch-grass.sh" is in
http://grass.ibiblio.org/faq/

now would you please help me?

Thank you so much.

--- Maliheh <malihehs@yahoo.com> wrote:

hi all,
I want to use GRASS commands in a my shell script, I
tried to use of batch-grass.sh:

./batch-grass.sh Tehran_2 root g.list type=rast

but I get this error:

./batch-grass.sh: line 61: g.list: command not found

I don't know if I should run grass at first and then
use of this script or not?

In this case(run the script in the grass env, I give
this error:

ERROR: program 'g.list' cannot be executed because:
Neither a command line (cmd) or interactive (inter)
version was found

Would you please help me to solve it?

Regards

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

Hello list,
I'm using grass57_exp_2004_01_17, I want to use of
some sql commands, I have one vector map:"Teh_Vect" so
at first I use:
#db.connect driver=dbf database=Teh_Vect
driver:dbf
database:Teh_Vect
But when I use:
#echo "select * from Teh_Vect" | db.select
I get this error:
DBMI-DBF driver error: Cannot open dbf database:
Teh_Vect
Would you please tell me what is my wrong?
Thank you soooooooo much

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

Thanks for your response, "batch-grass.sh" is in
http://grass.ibiblio.org/faq/

...

> I want to use GRASS commands in a my shell script, I
> tried to use of batch-grass.sh:
>
> ./batch-grass.sh Tehran_2 root g.list type=rast
>
> but I get this error:
>
> ./batch-grass.sh: line 61: g.list: command not found

...

> In this case(run the script in the grass env, I give
> this error:
>
> ERROR: program 'g.list' cannot be executed because:
> Neither a command line (cmd) or interactive (inter)
> version was found

make sure that the directories listed at the top of "batch-grass.sh"
are correct:

GISDBASE=/home/user/grassdata
GISBASE=/usr/local/grass5
GISRC=$GISDBASE/../.grassrc5

Checks for these should probably be added to the script..

Hamish

On Wednesday 03 March 2004 14:19, Maliheh wrote:

Hello list,
I'm using grass57_exp_2004_01_17, I want to use of
some sql commands, I have one vector map:"Teh_Vect" so
at first I use:
#db.connect driver=dbf database=Teh_Vect
driver:dbf
database:Teh_Vect
But when I use:
#echo "select * from Teh_Vect" | db.select
I get this error:
DBMI-DBF driver error: Cannot open dbf database:
Teh_Vect
Would you please tell me what is my wrong?
Thank you soooooooo much

database for dbf is full path to the directory where is dbf file.
v.db.connect -p tells where attribute table is.
By default dbf database is $GISDBASE/$LOCATION_NAME/$MAPSET/dbf

Radim

Hello dear all,
At first I want to say : "Thank you so much" with your
help now I can do many things :slight_smile:

At this time I want to know more about network
analysis in GRASS. Specifically about the algorithm
that GRASS uses to find shortest path between points
in 'v.net.path' module. I want to know if we don't
determine the 'afcol', 'abcol' and 'ncol' costs, then
what is measured for finding path? and when we specify
these values how they influence in algorithm?
Is there any document that can help me in this way?

Any suggestion will be so appreciated.

Regards

Maliheh

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

On Sunday 07 March 2004 10:58, you wrote:

Hello dear all,
At first I want to say : "Thank you so much" with your
help now I can do many things :slight_smile:

At this time I want to know more about network
analysis in GRASS. Specifically about the algorithm
that GRASS uses to find shortest path between points
in 'v.net.path' module. I want to know if we don't
determine the 'afcol', 'abcol' and 'ncol' costs, then
what is measured for finding path?

Length of network segments and 0 for nodes.

Radim

and when we specify
these values how they influence in algorithm?

These values are taken as costs of whole segments, i.e.
the length of segments is not used. For example, if you have for each
line in the network attribute 'max_speed' and 'length', you can get
more precise results, if you are looking for fastest path, using
afcol=length/max_speed (pg driver)

Radim

Is there any document that can help me in this way?

Any suggestion will be so appreciated.

Regards

Maliheh

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

Hello Radim,
thanks a lot for your response.

...in 'v.net.path' module. I want to know if we don't

determine the 'afcol', 'abcol' and 'ncol' costs,

then

what is measured for finding path?

Length of network segments and 0 for nodes.

-- Does it mean, if we have a road network digital
map, this value is equal to length of the road 'x' for
example?

and when we specify
these values how they influence in algorithm?

These values are taken as costs of whole segments,
i.e.
the length of segments is not used. For example, if
you have for each
line in the network attribute 'max_speed' and
'length', you can get
more precise results, if you are looking for fastest
path, using
afcol=length/max_speed (pg driver)

-- And you mean that if we want to find the fastest
path on a road map, we should know the length and some
other values about each road and specify them in
attribute table for it?
Would you please tell me more, what is the name of
algorithm that GRASS uses for finding path?

Best Regards
Maliheh

__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com

Hello Dear list,

I have written a tcl program that lets users to choose
two points on a road map:
Start point & Destination,
and then grass shows the path on a window by use of
v.net.path and d.vect.

Now I want to add "Search Criteria" option with
"shortest", "fastest" and all "paths" fields.

For achieve this goal I have 2 problems:
1. I think if I don't determine the afcol and abcol,
garss find the path according to the length of the
roads, am I right? if it's correct so for finding
shortest path I should do the same as above, but there
is a problem since I want "shown path" goes regularly
through one ways, so I should use abcol=-1; and when I
use of abcol option, its necessary to use afcol option
too. And in at this time I don't know what should I
write for afcol that shows the length of the streets.
If I should know their length myself before use of
grass or ...?

2.For fastest option I have the same problem, I don't
know what should I write for afcol in my DB, for
example If I want to use x/2 (where x is the length of
the line) for highways, how I can get the x?

in one word: How I can have the length of roads on a
map by use of GRASS?

I wish you can help me. Any suggestion will be so
appreciated.

Best Regards

Maliheh

__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway
http://promotions.yahoo.com/design_giveaway/

Hello all,
I need to the set geometry and dimentions of the
currently active display monitor.
for dimentions I used:
GRASS_HEIGHT=500
export GRASS_HEIGHT
GRASS_WIDTH=700
export GRASS_WIDTH

but I don't know how I can set top and left corner of
the monitor, GRASS_TOP and GRASS_LEFT don't work.

Would you please show me the way?

Thanks a lot

__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway
http://promotions.yahoo.com/design_giveaway/

Maliheh wrote:

I need to the set geometry and dimentions of the
currently active display monitor.
for dimentions I used:
GRASS_HEIGHT=500
export GRASS_HEIGHT
GRASS_WIDTH=700
export GRASS_WIDTH

but I don't know how I can set top and left corner of
the monitor, GRASS_TOP and GRASS_LEFT don't work.

Would you please show me the way?

XDRIVER doesn't provide any mechanism to allow a specific window
position to be requested.

--
Glynn Clements <glynn.clements@virgin.net>

Hello list,
I would like to know if there is a way to do this:
I would like to take a least-cost path route created
by v.net.path, and then export the results to a second
application in the form of a list of lat-long
coordinates such as:
35.705318 51.350611
35.705327 51.350620
35.705330 51.350627
35.705327 51.350627
35.705321 51.350620
35.705318 51.350608
35.705321 51.350604
...
Any suggestion will be so appreciated.

Regards

Maliheh

__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash