[GRASS-user] Using v.colors in WinGRASS

Greetings

I’m using winGRASS6.4.1 (compiled from OSGEO4w) and I’m having a difficulty on applying v.colors.
I have a raster map (r.reclass) that I convert to vector/areas. So far so good…
But when I try to apply v.colors with this expression:
v.colors map=teste01_LULC@Regional column=cat color=aspect

I get this error:

Creating column …
E:/GRASS6/scripts/v.colors: v.db.addcol: command not found
ERROR: Creating color column

This v.db.addcol is present in the Scripts folder

If i do v.info to my vector file I get this information…

±---------------------------------------------------------------------------+
| Layer: teste01_LULC |
| Mapset: Regional |
| Location: LOCAL |
| Database: E:\v3 |
| Title: |
| Map scale: 1:1 |
| Map format: native |
| Name of creator: orbit |
| Organization: |

Source date: Tue Nov 09 11:11:40 2010
Type of Map: vector (level: 2)
Number of points: 0 Number of areas: 213680
Number of lines: 0 Number of islands: 73649
Number of boundaries: 348770 Number of faces: 0
Number of centroids: 213666 Number of kernels: 0
Map is 3D: No
Number of dblinks: 1
Projection: Universal Transverse Mercator (zone 0)
N: 8832707.83027649 S: 7028073.62772369
E: 1347458.42001915 W: 200792.5777576
Digitization threshold: 0
Comments:
±---------------------------------------------------------------------------+

Can anybody help me?

Hi,

v.db.addcol should be there by default.

Maybe there has to be a table connected to the vector map!

This can bo done with 'v.db.addtable'.

Achim

Am 09.11.2010 12:55, schrieb Luisa Peña:

v.colors map=teste01_LULC@Regional column=cat color=aspect

I get this error:
Creating column <GRASSRGB> ...
E:/GRASS6/scripts/v.colors: v.db.addcol: command not found
ERROR: Creating color column
This v.db.addcol is present in the Scripts folder

On Tue, Nov 9, 2010 at 12:55 PM, Luisa Peña <luisapena1979@gmail.com> wrote:

Greetings
I'm using winGRASS6.4.1 (compiled from OSGEO4w) and I'm having a difficulty
on applying v.colors.
I have a raster map (r.reclass) that I convert to vector/areas. So far so
good...
But when I try to apply v.colors with this expression:
v.colors map=teste01_LULC@Regional column=cat color=aspect

I get this error:
Creating column <GRASSRGB> ...
E:/GRASS6/scripts/v.colors: v.db.addcol: command not found

I have seen something similar with v.rast.stats in wingrass. It seems
that in wingrass, scripts can not call other scripts, only C modules.
This might have something to do with the way scripts are called
through a .bat file.

Markus M

ERROR: Creating color column
This v.db.addcol is present in the Scripts folder
If i do v.info to my vector file I get this information...

+----------------------------------------------------------------------------+
| Layer: teste01_LULC
|
| Mapset: Regional
|
| Location: LOCAL |
| Database: E:\v3
|
| Title:
|
| Map scale: 1:1
|
| Map format: native
|
| Name of creator: orbit |
| Organization:
|
| Source date: Tue Nov 09 11:11:40 2010
|
|----------------------------------------------------------------------------|
| Type of Map: vector (level: 2)
|
|
|
| Number of points: 0 Number of areas: 213680
|
| Number of lines: 0 Number of islands: 73649
|
| Number of boundaries: 348770 Number of faces: 0
|
| Number of centroids: 213666 Number of kernels: 0
|
|
|
| Map is 3D: No
|
| Number of dblinks: 1
|
|
|
| Projection: Universal Transverse Mercator (zone 0)
|
| N: 8832707.83027649 S: 7028073.62772369
|
| E: 1347458.42001915 W: 200792.5777576
|
|
|
| Digitization threshold: 0
|
| Comments:
|
|
|
+----------------------------------------------------------------------------+

Can anybody help me?
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

2010/11/9 Markus Metz <markus.metz.giswork@googlemail.com>:

On Tue, Nov 9, 2010 at 12:55 PM, Luisa Peña <luisapena1979@gmail.com> wrote:

Greetings
I'm using winGRASS6.4.1 (compiled from OSGEO4w) and I'm having a difficulty
on applying v.colors.
I have a raster map (r.reclass) that I convert to vector/areas. So far so
good...
But when I try to apply v.colors with this expression:
v.colors map=teste01_LULC@Regional column=cat color=aspect

I get this error:
Creating column <GRASSRGB> ...
E:/GRASS6/scripts/v.colors: v.db.addcol: command not found

try r44284, hopefully fixed.

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

Ok I implented what is in 4r44284
1- v.db.connect -p map=teste_09_LULC
layers <1> table <teste09_LULC> in database <E:\v3/LOCAL/Regional/dbf> through driver with key
CVector map <teste09_LULC> is connected by:

2- v.colors map=teste01_LULC@Regional column=cat color=aspect
I get:
Creating column …
E:/GRASS6/scripts/v.colors: v.db.addcol: command not found
— THIS APPROACH Didn’t work–
Then a different approach
1- r.to.vect (OK)
2- v.db.droptable
3- v.db.addtable
4- v.db.addcol map=teste10_LULC columns=GRASSRGB varchar(12)
5- v.colors map=teste10_LULC column=cat rgb_column=GRASSRGB color=random
Scanning values…
Looking up colors…
Writing 10 colors…
DONE

Ok then I displayed the vector but… I don’t see ANY COLOR I see all in GREY without any distinction between polygons
What might be missing?
Luisa

2010/11/9 Martin Landa <landa.martin@gmail.com>

2010/11/9 Markus Metz <markus.metz.giswork@googlemail.com>:

On Tue, Nov 9, 2010 at 12:55 PM, Luisa Peña <luisapena1979@gmail.com> wrote:

Greetings
I’m using winGRASS6.4.1 (compiled from OSGEO4w) and I’m having a difficulty
on applying v.colors.
I have a raster map (r.reclass) that I convert to vector/areas. So far so
good…
But when I try to apply v.colors with this expression:
v.colors map=teste01_LULC@Regional column=cat color=aspect

I get this error:
Creating column …
E:/GRASS6/scripts/v.colors: v.db.addcol: command not found

try r44284, hopefully fixed.

Martin


Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

Am 09.11.2010 15:51, schrieb Luisa Peña:

Ok I implented what is in 4r44284
1- v.db.connect -p map=teste_09_LULC
layers <1> table <teste09_LULC> in database <E:\v3/LOCAL/Regional/dbf>
through driver <dbf> with key <cat>
CVector map <teste09_LULC> is connected by:

Vector map should be connected by something. So there is still something wrong.

Did you try another database type? (like eg. sqlite?)

On Tue, Nov 9, 2010 at 3:22 PM, Martin Landa <landa.martin@gmail.com> wrote:

2010/11/9 Markus Metz <markus.metz.giswork@googlemail.com>:

On Tue, Nov 9, 2010 at 12:55 PM, Luisa Peña <luisapena1979@gmail.com> wrote:

Greetings
I'm using winGRASS6.4.1 (compiled from OSGEO4w) and I'm having a difficulty
on applying v.colors.
I have a raster map (r.reclass) that I convert to vector/areas. So far so
good...
But when I try to apply v.colors with this expression:
v.colors map=teste01_LULC@Regional column=cat color=aspect

I get this error:
Creating column <GRASSRGB> ...
E:/GRASS6/scripts/v.colors: v.db.addcol: command not found

try r44284, hopefully fixed.

Sorry, not related to whitespace, wingrass installations on German
systems have no whitespace in the path, but the same error:
v.db.addcol: command not found

Markus M

try r44284, hopefully fixed.

perhaps buggy:

- CMDLINE="`basename $0`"
+ CMDLINE="`basename "$0"`"

becomes "`basename " + $0 + "`"

afair the " do not nest.

maybe outer quotes are not needed?
(but regardless I'm fairly sure this is not the cause of the v.colors bug, just a red herring)

?,
Hamish

Markus Metz wrote:

I have seen something similar with v.rast.stats in wingrass. It seems
that in wingrass, scripts can not call other scripts, only C modules.
This might have something to do with the way scripts are called
through a .bat file.

How do people feel about replacing shell scripts with Python for 6.5?

--
Glynn Clements <glynn@gclements.plus.com>

Hi
as I said in a previous email, it’s still not working.

Luisa

2010/11/10 Hamish <hamish_b@yahoo.com>

try r44284, hopefully fixed.

perhaps buggy:

  • CMDLINE=“basename $0
  • CMDLINE=“basename "$0"

becomes “basename " + $0 + "

afair the " do not nest.

maybe outer quotes are not needed?
(but regardless I’m fairly sure this is not the cause of the v.colors bug, just a red herring)

?,
Hamish

Hi,

2010/11/11 Glynn Clements <glynn@gclements.plus.com>:

I have seen something similar with v.rast.stats in wingrass. It seems
that in wingrass, scripts can not call other scripts, only C modules.
This might have something to do with the way scripts are called
through a .bat file.

How do people feel about replacing shell scripts with Python for 6.5?

personally I could imagine this replacement also in GRASS 6.4.1. It's
quite big pain to maintain scripts in two languages or better to say
there is not enough manpower to do that. Moreover we will have always
problems with bash scripts on Windows.

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

2010/11/10 Hamish <hamish_b@yahoo.com>:

try r44284, hopefully fixed.

perhaps buggy:

- CMDLINE="`basename $0`"
+ CMDLINE="`basename "$0"`"

becomes "`basename " + $0 + "`"

afair the " do not nest.

maybe outer quotes are not needed?
(but regardless I'm fairly sure this is not the cause of the v.colors bug, just a red herring)

it fixes white spaces in the path, e.g.

basename: extra operand
`(x86)/GRASS-65-SVN/scripts/v.db.addcol'
Try `basename --help' for more information.
C:/Program Files (x86)/GRASS-65-SVN/scripts/v.db.addcol:
line 116: unexpected EOF while looking for matching ``'
C:/Program Files (x86)/GRASS-65-SVN/scripts/v.db.addcol:
line 125: syntax error: unexpected end of file

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

Glynn wrote:

How do people feel about replacing shell
scripts with Python for 6.5?

extremely negative. I'm totally against that.
please lets just let the stable branch become
stable. I don't want to see that change in
6.4.x, so no point to make 6.5 deviate from the
stable branch any more than it already has.
IMHO 6.5 is only for testing backports and fixes
before actually commiting the backport to 6.4.

I do not believe it's a fundamental flaw
which can not be worked around in the
current framework- calling a shell script
from another shell script on WinGRASS does
work- e.g. r.in.wms calls r.tileset (also
a bunch of other private helper shell scripts).
[that r.in.wms has other issues is not very
relevant to this point]

and so I reject the idea to fix a fixable
bug by replacing a huge work of well tested
code by much less tested replacements.

I would like to declare 6.x closed for new
major changes ASAP, if that is not already
the case. New devel should happen in 7.

thanks,
Hamish

Hi,

2010/11/12 Hamish <hamish_b@yahoo.com>:

Glynn wrote:

How do people feel about replacing shell
scripts with Python for 6.5?

extremely negative. I'm totally against that.
please lets just let the stable branch become

well, please keep in mind that we have not enough manpower to maintain
the same scripts in two languages. So please developers, maintain
primary Python scripts! Don't waste your time with GRASS 6. Forget
about bash scripts. Windows users please consider some problems using
GRASS 6 because of bash scripts which are pain on Windows.

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

On Thu, Nov 11, 2010 at 4:39 PM, Martin Landa <landa.martin@gmail.com> wrote:

Hi,

2010/11/11 Glynn Clements <glynn@gclements.plus.com>:

I have seen something similar with v.rast.stats in wingrass. It seems
that in wingrass, scripts can not call other scripts, only C modules.
This might have something to do with the way scripts are called
through a .bat file.

How do people feel about replacing shell scripts with Python for 6.5?

personally I could imagine this replacement also in GRASS 6.4.1. It's
quite big pain to maintain scripts in two languages or better to say
there is not enough manpower to do that. Moreover we will have always
problems with bash scripts on Windows.

I fully agree unless the "native" script support is not removed (as in 7).

Markus

On Wed, Nov 10, 2010 at 11:39 AM, Hamish <hamish_b@yahoo.com> wrote:

try r44284, hopefully fixed.

perhaps buggy:

- CMDLINE="`basename $0`"
+ CMDLINE="`basename "$0"`"

becomes "`basename " + $0 + "`"

afair the " do not nest.

maybe outer quotes are not needed?
(but regardless I'm fairly sure this is not the cause of the v.colors bug, just a red herring)

For the record:

Fixed in r45247 (6.4) and r45248 (6.5) with only the inner quotes:

CMDLINE=`basename "$0"`

Tested successfully for v.in.geonames. This should also fix odd wxGUI/XML
errors.

Markus