[GRASS-user] trouble with 'where' statement to select points for labels (in d.vect)

Hello,

I am trying to add labels to a map, where most of the labels get printed
beside the shape (in this case, it is a point vector), while one label
(point #16) gets printed above the shape to prevent label overlap.

What I am doing is

#!/bin/bash

d.mon start=PNG

d.vect PointsVect type=point display=shape
d.vect PointsVect type=point display=attr attrcol="Name" yref=top xref=left
where='cat=16' #### (to add the label for point number 16)
d.vect PointsVect type=point display=attr attrcol="Name" yref=center
xref=left where='cat!=16' #### (to add the labels for all other points)

d.mon stop=PNG

For some reason, the 'cat=16' statement works fine, but 'cat!=16' does not.
For the latter, I get the following error messages:

dbmi: Protocol error
dbmi: Invalid procedure 101

When I look online through bash scripting tutorials, it says != is the
symbol for 'not equal'. Am I wrong on that? Is there something else wrong
with my syntax?

Thanks for any help,
Tim
--
View this message in context: http://n2.nabble.com/trouble-with-where-statement-to-select-points-for-labels-in-d-vect-tp3763579p3763579.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Hi,

maybe its the database syntax: try 'not cat=16'

Achim

Tim Holland schrieb:

Hello,

I am trying to add labels to a map, where most of the labels get printed
beside the shape (in this case, it is a point vector), while one label
(point #16) gets printed above the shape to prevent label overlap.

What I am doing is

#!/bin/bash

d.mon start=PNG

d.vect PointsVect type=point display=shape
d.vect PointsVect type=point display=attr attrcol="Name" yref=top xref=left
where='cat=16' #### (to add the label for point number 16)
d.vect PointsVect type=point display=attr attrcol="Name" yref=center
xref=left where='cat!=16' #### (to add the labels for all other points)

d.mon stop=PNG

For some reason, the 'cat=16' statement works fine, but 'cat!=16' does not.
For the latter, I get the following error messages:

dbmi: Protocol error
dbmi: Invalid procedure 101

When I look online through bash scripting tutorials, it says != is the
symbol for 'not equal'. Am I wrong on that? Is there something else wrong
with my syntax?

Thanks for any help,
Tim

That did it! Thanks very much.
Tim

On Sun, Oct 4, 2009 at 7:08 PM, achim <ak7@jupiter.uni-freiburg.de> wrote:

Hi,

maybe its the database syntax: try ‘not cat=16’

Achim

Tim Holland schrieb:

Hello,

I am trying to add labels to a map, where most of the labels get printed
beside the shape (in this case, it is a point vector), while one label
(point #16) gets printed above the shape to prevent label overlap.

What I am doing is

#!/bin/bash

d.mon start=PNG

d.vect PointsVect type=point display=shape
d.vect PointsVect type=point display=attr attrcol=“Name” yref=top xref=left
where=‘cat=16’ #### (to add the label for point number 16)
d.vect PointsVect type=point display=attr attrcol=“Name” yref=center
xref=left where=‘cat!=16’ #### (to add the labels for all other points)

d.mon stop=PNG

For some reason, the ‘cat=16’ statement works fine, but ‘cat!=16’ does not.
For the latter, I get the following error messages:

dbmi: Protocol error
dbmi: Invalid procedure 101

When I look online through bash scripting tutorials, it says != is the
symbol for ‘not equal’. Am I wrong on that? Is there something else wrong
with my syntax?

Thanks for any help,
Tim