On 16/04/09 06:29, Adam Dershowitz, Ph.D., P.E. wrote:
I really liked the suggestion, so I tried it....but it doesn't work. To continue my simple example, I did create view less2 cat,Value
from data where Value < 2; So I end up with a view, as expected. The
problem is that if I now link my map to that view, I get an error: No
attribute found for cat 1 (since the object still tries to link to 1). And, the same for 2 and 4. And, I still see the points and
slashes (ie it still draws point a and puts a null value then a slash
then 1.1. So is there a way to have it not draw a symbol and not draw
"null text" when it can't find an attribute?  Since, the whole point
of what I am trying to do in this case is to eliminate certain data
with a query?

What do you mean by "eliminate" ?

Maybe you should be more precise about your objectives. Are you trying to display something on a map, or not ? If all your looking for is tables, than you don't need GRASS at all.


On 16/04/09 07:35, Adam Dershowitz, Ph.D., P.E. wrote:
 > It seems like I should be able to edit the cats, and I tried a few
different things with v.edit, but I have not had any luck.  I tried
some things like this: v.edit map=foo tool=catdel -r where="cat > 0" but it gives me: ERROR: Tool catdel requires option cats Although the
above seems to work with tool=select, which I was using to test
things about before doing the delete.

As the message says, tool catdel does not work with a select, but you have to give it a list of cats. You can do that with something like this:

v.edit map=foo tool=catdel cats=`v.db.select -c foo col=cat where=XYZ | awk '{printf"%i,",$1} END{print}'`
(note the back ticks)

I copied my original vectors, and created the view.  Now what I want
to do is to delete all the categories in this vector that point to
null. Is there a way to do that?

Why do you want to do that ? If I understood you correctly, all of these cats have a meaning. Maybe not in the currently linked view, but in the original table. So if you delete these cats, you will lose the link to the values in the original table.

Again, I think we need a better explanation of what it is you are trying to get at.

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

Reply via email to