Opened 10 years ago

Closed 6 years ago

#2219 closed enhancement (fixed)

wish: all modules that create a new map should put the module call into history

Reported by: mlennert Owned by: grass-dev@…
Priority: normal Milestone: 7.4.0
Component: Vector Version: svn-trunk
Keywords: history module call Cc:
CPU: Unspecified Platform: All

Description

Most raster modules do this already, but many vector modules don't, but I think it would be very helpful if all newly created map could contain the module call that created it in its history/support file.

Is this something that needs to be done module by module, or is there a possibility to +/- automate this ?

Moritz

Change History (9)

comment:1 by neteler, 10 years ago

Component: DefaultVector
Platform: UnspecifiedAll

This is the unfiltered list of vector commands potentially lacking Vect_hist_command():

find vector/ -name "main.c" | xargs fgrep --files-without-match Vect_hist | grep -v v.out
vector/v.convert/main.c
vector/v.label/main.c
vector/v.colors.out/main.c
vector/v.to.rast/main.c
vector/v.colors/main.c
vector/v.vect.stats/main.c
vector/v.what/main.c
vector/v.lrs/v.lrs.where/main.c
vector/v.lrs/v.lrs.label/main.c
vector/v.lrs/v.lrs.create/main.c
vector/v.lrs/v.lrs.segment/main.c
vector/v.external.out/main.c
vector/v.db.select/main.c
vector/v.net.visibility/main.c
vector/v.to.db/main.c
vector/v.univar/main.c
vector/v.kcv/main.c
vector/v.label.sa/main.c
vector/v.normal/main.c
vector/v.surf.idw/main.c
vector/v.neighbors/main.c
vector/v.to.rast3/main.c
vector/v.timestamp/main.c
vector/v.class/main.c
vector/v.build/main.c

For some of them it will not be useful, reducing the remaining modules to a few.

Which is most important for you?

comment:2 by mlennert, 10 years ago

Actually, I notice that my understanding was wrong: command history is often written, but it is not displayed when you use v.info (aka Metadata in the wxGUI), you have to explicitly as for v.info -h.

This is not the case for most raster modules, where you see the command history with r.info, without the need for the -h flag.

Any reason for that difference ?

I think that creation command history is important enough to be part of the "base" package of information delivered by the r/v.info commands.

in reply to:  1 ; comment:3 by mlennert, 10 years ago

Replying to neteler:

This is the unfiltered list of vector commands potentially lacking Vect_hist_command(): Which is most important for you?

I would say all that create information for which it is important to remember how it was created. So, in a quick scan of the list:

> vector/v.to.rast/main.c
> vector/v.vect.stats/main.c
> vector/v.lrs/v.lrs.label/main.c
> vector/v.lrs/v.lrs.create/main.c
> vector/v.lrs/v.lrs.segment/main.c
> vector/v.net.visibility/main.c
> vector/v.kcv/main.c
> vector/v.surf.idw/main.c
> vector/v.neighbors/main.c
> vector/v.to.rast3/main.c

in reply to:  3 ; comment:4 by neteler, 10 years ago

Replying to mlennert:

  • vector/v.to.rast/main.c
    • already there: Rast_command_history()
  • vector/v.vect.stats/main.c
    • not generating a map
  • vector/v.lrs/v.lrs.label/main.c
  • vector/v.lrs/v.lrs.create/main.c
  • vector/v.lrs/v.lrs.segment/main.c
  • vector/v.net.visibility/main.c
  • vector/v.kcv/main.c
    • not generating a map

TODO: Here is would be nice to "inject" the vector cmd history into the raster history function (no idea how?) in order to write it out for the raster output:

  • vector/v.surf.idw/main.c
  • vector/v.neighbors/main.c
  • vector/v.to.rast3/main.c

in reply to:  4 comment:5 by mlennert, 10 years ago

Replying to neteler:

Replying to mlennert:

  • vector/v.vect.stats/main.c
    • not generating a map

No, but having the command history to see which command call was used to fill the attribute column could be useful...

  • vector/v.lrs/v.lrs.label/main.c
  • vector/v.lrs/v.lrs.create/main.c
  • vector/v.lrs/v.lrs.segment/main.c
  • vector/v.net.visibility/main.c

Thanks !

  • vector/v.kcv/main.c
    • not generating a map

Agreed that it's not really useful here.

TODO: Here is would be nice to "inject" the vector cmd history into the raster history function (no idea how?) in order to write it out for the raster output:

  • vector/v.surf.idw/main.c
  • vector/v.neighbors/main.c
  • vector/v.to.rast3/main.c

This should be the same as v.to.rast, no ?

How about the other way around: raster->vector modules ?

But again, my main issue is actually that to see that history you have to use the -h flag for vectors, but not for rasters...

Moritz

comment:6 by martinl, 8 years ago

Milestone: 7.0.07.0.5

comment:7 by martinl, 8 years ago

Milestone: 7.0.57.3.0

comment:8 by martinl, 8 years ago

Milestone: 7.3.07.4.0

Milestone renamed

comment:9 by martinl, 6 years ago

Resolution: fixed
Status: newclosed

No activity 4 years, closing. Feel free to reopen if needed.

Note: See TracTickets for help on using tickets.