[GRASS-dev] v.edit updates

Wolf Bergenheim wolf+grass at bergenheim.net
Thu Dec 14 08:58:58 EST 2006


On Wed, 13 Dec 2006, Jachym Cepicky wrote:

> Hallo,
> since nobody answared, I suppose there nobody had enough time to check
> the patches.
>
> Before I move with further development, I would like to hear from the
> GRASS-core developers, that this changes are all right and worth to be
> committed to cvs.

I have now looked at the patches, but only briefly. It's good to hear that 
someone has picked up the little v.edit, while I've been busy elsewhere. (:
So far I like what I'm seeing. Good work. I think that this should be 
committed to the cvs.

Comments below:

> I did not commit this changes yet, because of they are changing behavior
> and features of v.edit significantly.
>
> Removed options:
>    type - there is no need to define type of the vector input feature,
>            this can be done using other methods (grass ascii format)

OK, this will enable you to input many things in one command.

>    values - all database updates should be done via db.* commands
>
> Changes options:
>    coords - coords were used for data inputs. But it could come to
>            maximum length of a line limit.
>            coords option is used for feature identification, not for
>            data input

This is good, and this was my idea in the end, but I never got so far. I 
made coords into input to be able to test things.

>    action->tool - IMHO "tool" does fit idea of the option better, than
>            action

Yes. I like this. It is a lot nicer then option, but option is standard. I 
would go with tool.

>
>    tools:  merge - removed
>            new tools introduced

Is merge not needed? Or do you think other modules should do this? Could 
you briefly describe the other tools? I noticed that they are in the wiki, 
but I'd like to hear your thoughts and ideas behind the other tools.

> How to test this:
> This commands should give you impression about how v.edit currently
> works:
>
> # copy soils map
> g.copy vect=soils,tmp --o
> d.mon x0
> d.vect tmp
>
> # add new line the soils map
> echo "L 2 1
> 593229.5625       4917307.3125
> 606824.0625            4926102
> 1 60" | v.edit map=tmp tool=add
>
> v.build tmp

I think that maybe v.edit should rebuild the topology, there shouldn't be 
any need to use v.build. Does anybody else have an opinion about this?

> echo "insert into tmp (cat, label) values (60,'road');"|db.execute
> d.redraw
>
> # remove feature defined by coordinates
> v.edit map=tmp tool=delete coords=593229.5625,4917307.3125
> d.redraw # line should be removed

:) nice

>
> # remove feature defined by category
> v.edit map=tmp tool=delete cat=13
> d.redraw # big soil area on south should be removed
>

does this also remove the attributes from the DB?

> # remove featuers defined by bounding box
> d.graph -m color=0:255:0 << EOF
> width 4
> polyline
> 602203.125 4918112.25
> 602203.125 4924402.6875
> 604319.8125 4924402.6875
> 604319.8125 4918112.25
> 602203.125 4918112.25
> EOF
>
> v.edit map=tmp tool=delete bbox=602203.125,4918112.25,604319.8125,4924402.6875
> d.redraw
>
> I prepared new patch (attached). If there will be no provisos, I would
> like to add this to cvs soon and continue with the development.
>

I think you should keep up the good work! Sorry I've had to disappear 
into the background...

--Wolf

-- 

<:3 )---- Wolf Bergenheim ----( 8:>




More information about the grass-dev mailing list