[GRASS-user] Some questions

Hi all,
I am new here and to grass, so I have some questions about working with grass.

First,
I have some maps and one line, witch represents the boundary of area. And I need to trim my maps with this line (somethings like Clip by ESRI). Is it possible with Grass tools?

Next…
To my polygon map I want to add some polygons from other polygon map (Update, again like ESRI). I am not sure if v.patch is the best solution to get this

Next…
Can I edit the column header (name and type) of attribute table? I know another WIN software that can it do, but i am interested in GRASS now. Is it possible to remove some columns from the table with Grass?

I would be happy if you could me give any answers.
Best regards

On 5/30/07, Martin Besta <martin.besta@googlemail.com> wrote:

Hi all,
I am new here and to grass, so I have some questions about working with grass.

Hello and welcome to the fun world of open source GRASS GIS!!!

First,
I have some maps and one line, witch represents the boundary of area. And I need to trim my maps with this line (somethings like Clip by ESRI). Is it possible with Grass tools?

v.overlay will do a clip, inputting a line and a area as the “clipper”. by selecting the “and” operator you will get the clipped lines.

Next…
To my polygon map I want to add some polygons from other polygon map (Update, again like ESRI). I am not sure if v.patch is the best solution to get this

v.patch should do the trick.

Next…
Can I edit the column header (name and type) of attribute table? I know another WIN software that can it do, but i am interested in GRASS now. Is it possible to remove some columns from the table with Grass?

v.category looks like it edits attributes.

Sorry I cant be more definitive, but I’m working off of the old memory banks. =D

I would be happy if you could me give any answers.
Best regards


grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

Martin Besta wrote:

Can I edit the column header (name and type) of attribute table?

I think you can edit DBF column headers in OpenOffice.

Is it possible to remove some columns from the table with Grass?

GRASS 6.3cvs has:

v.db.addcol
v.db.connect
v.db.droptable
v.db.renamecol
v.db.update
v.db.addtable
v.db.dropcol
v.db.reconnect.all
v.db.select

(these are mostly/all? just shell scripts)

v.db.renamecol and v.db.dropcol should do the trick.

you can do any/most raw SQL commands with db.execute.

Hamish

Hi all,
I have two questions and maybe one solution.

When I am executing v.overlay (to clip my map with boundary line) I recieve always the clipped line (ainput is line, binput is area), however I need the polygon. When I switched first and second input layer, I had recieved an empty layer.

A little problem I have with v.buffer...the output is without attribut table. I was trying first v.buffer, then v.db.addtable and finaly v.overaly intersect with input line for buffer. But then is the output line again.

The problem with the spatial dissolve I did with the conversion to raster and raster to vector again. Every raster cell has value from the attribut (biotop code in my layer) and the conversion to vector again dissolved all other lines, only polygons boundaries stay on.

Thx for your help.
Martin

On 5/30/07, *Martin Besta* <martin.besta@googlemail.com <mailto:martin.besta@googlemail.com>> wrote:

    Hi all,
    I am new here and to grass, so I have some questions about working
    with grass.

Hello and welcome to the fun world of open source GRASS GIS!!!

    First,
    I have some maps and one line, witch represents the boundary of
    area. And I need to trim my maps with this line (somethings like
    Clip by ESRI). Is it possible with Grass tools?

v.overlay will do a clip, inputting a line and a area as the "clipper". by selecting the "and" operator you will get the clipped lines.

    Next...
    To my polygon map I want to add some polygons from other polygon
    map (Update, again like ESRI). I am not sure if v.patch is the
    best solution to get this

v.patch should do the trick.

    Next..
    Can I edit the column header (name and type) of attribute table? I
    know another WIN software that can it do, but i am interested in
    GRASS now. Is it possible to remove some columns from the table
    with Grass?

v.category looks like it edits attributes.
Sorry I cant be more definitive, but I'm working off of the old memory banks. =D

    I would be happy if you could me give any answers.
    Best regards
    _______________________________________________
    grassuser mailing list
    grassuser@grass.itc.it <mailto:grassuser@grass.itc.it>
    http://grass.itc.it/mailman/listinfo/grassuser

Martin Besta wrote:

When I am executing v.overlay (to clip my map with boundary line) I
recieve always the clipped line (ainput is line, binput is area),
however I need the polygon. When I switched first and second input
layer, I had recieved an empty layer.

note features to be considered should have some cat value. (v.category)

A little problem I have with v.buffer...the output is without attribut
table.

v.buffer can't transfer the attribute as a new area may be from the
overlap of two original areas with different attributes. (this was
buried in the help page, I've just made it more visible)

I was trying first v.buffer, then v.db.addtable and finaly v.overaly
intersect with input line for buffer. But then is the output line
again.

can you reproduce the effect using the demo spearfish dataset, and post
the command line commands?

The problem with the spatial dissolve I did with the conversion to
raster and raster to vector again. Every raster cell has value from
the attribut (biotop code in my layer) and the conversion to vector
again dissolved all other lines, only polygons boundaries stay on.

glad you found something that worked; it would be nicer to not need the
conversion from v->r->v of course.

v.distance might help for reconnecting attributes.

Hamish

/I was trying first v.buffer, then v.db.addtable and finaly v.overaly
intersect with input line for buffer. But then is the output line
again.
/

/
can you reproduce the effect using the demo spearfish dataset, and post
the command line commands?/

  Buffer 5 meters for layer of roads from sperfish60 dataset

1. v.buffer input=roads output=roads_5m type=point,line,area layer=1 buffer=2.5 scale=1.0 tolerance=0.01

2. v.db.addtable map=roads_5m layer=1 'columns=cat integer, atribut integer'

3. v.overlay ainput=roads atype=line alayer=1 binput=roads_5m btype=area blayer=1 output=overlay_roads_buffer5m operator=and olayer=1,0,0

Output is always a line, however i need the polygon.

Martin Besta wrote:

>
>> /I was trying first v.buffer, then v.db.addtable and finaly
>v.overaly > intersect with input line for buffer. But then is the
>output line > again.
>> /

Hamish:

> can you reproduce the effect using the demo spearfish dataset, and
> post the command line commands?/
>

Buffer 5 meters for layer of roads from sperfish60 dataset
1. v.buffer input=roads output=roads_5m type=point,line,area layer=1
  buffer=2.5 scale=1.0 tolerance=0.01

2. v.db.addtable map=roads_5m layer=1 'columns=cat integer, atribut
  integer'

3. v.overlay ainput=roads atype=line alayer=1 binput=roads_5m
  btype=area blayer=1 output=overlay_roads_buffer5m operator=and
  olayer=1,0,0

Output is always a line, however i need the polygon.

The output is correct for "v.overlay operator=and". The intersection
between the two vectors only happens where they both exist, and that is
only exactly on the line.

see
http://grass.ibiblio.org/grass60/screenshots/vector.php
http://grass.ibiblio.org/grass57/tutorial/vectoroverlay.html

When I am executing v.overlay (to clip my map with boundary line) I
recieve always the clipped line (ainput is line, binput is area),
however I need the polygon. When I switched first and second input
layer, I had recieved an empty layer.

I think you want "v.select operator=overlap", not v.overlay.

Hamish