Ticket #1629 (closed bug: fixed)

Opened 4 years ago

Last modified 4 years ago

parameter name changed in v.buffer and r.surf.fractal from GRASS 6.3 to GRASS 6.4

Reported by: pcav Owned by: rugginoso
Priority: major: does not work as expected Milestone: Version 1.0.3
Component: GRASS Version: Trunk
Keywords: Cc: neteler, grass-dev@…
Platform Version: Platform: All
Must Fix for Release: No Awaiting user input: no

Description

In GRASS64, v.buffer is deprecated, and v.buffer2 should be used instead. Looks like the "buffer" parameter was removed in 6.4. v.buffer --interface-description doesn't report it anymore (thanks jef for pointing out). As a result, the command is not working: Cannot find key buffer

Change History

  Changed 4 years ago by neteler

  • cc neteler added

I cannot reproduce this:

GRASS 6.4.0svn (spearfish60):~ > v.buffer --interface-description
<?xml version="1.0" encoding="UTF-8"?>                           
<!DOCTYPE task SYSTEM "grass-interface.dtd">                     
<task name="v.buffer">                                           
        <description>                                            
                Creates a buffer around features of given type (areas must contain centroid).
        </description>                                                                       
        <keywords>                                                                           
                vector, buffer                                                               
        </keywords>                                                                          

The new code is obviously named "v.buffer" as before:

GRASS 6.4.0svn (spearfish60):~/grass64 > head vector/v.buffer2/Makefile
MODULE_TOPDIR = ../..

PGM = v.buffer
...

The GRASS 6 production line should maintain full compatibility even if a module is rewritten from scratch as in the case of v.buffer.

GRASS 6.4.0svn (spearfish60):~/grass64 > v.buffer help

Description:
 Creates a buffer around features of given type (areas must contain centroid).

Keywords:
 vector, buffer

Usage:
 v.buffer [-sc] input=name output=name [type=string[,string,...]]
   [layer=value] [distance=value] [minordistance=value] [angle=value]
   [bufcolumn=name] [scale=value] [tolerance=value] [--overwrite]
   [--verbose] [--quiet]

Ha, I see the problem:

# GRASS 6.3, http://grass.osgeo.org/grass63/manuals/html63_user/v.buffer.html:
buffer=float
    Buffer distance in map units

# GRASS 6.4, http://grass.osgeo.org/grass64/manuals/html64_user/v.buffer.html:
distance=float
    Buffer distance along major axis in map units

This is bad and needs to be fixed in GRASS unless QGIS can update "buffer" to "distance" in the XML file.

Markus

  Changed 4 years ago by neteler

  • summary changed from replace v.buffer with v.buffer2 for GRASS 6.4 to parameter name changed in v.buffer from GRASS 6.3 to GRASS 6.4

  Changed 4 years ago by pcav

I would suggest to change it in GRASS. If this is not possible, please let us know, and we'll change the qgis module (but I do not like the idea of having two different modules, one for grass63 and one for grass64, even though they can be selected during compilation)

  Changed 4 years ago by neteler

  • status changed from new to closed
  • resolution set to fixed

Done. From grass-dev:

On Thu, Apr 23, 2009 at 1:36 PM, Hamish wrote:

in devbr6 and relbr6_4 I have added backwards compatibility aliases for the removed options. so all should be ok again. Hamish

Closing.

  Changed 4 years ago by hamish

Markus:

unless QGIS can update "buffer" to "distance" in the XML file.

Even though the old name now works again, the XML file should be updated for forward compatibility with GRASS 7, when the old name will be removed again. (currently both names for it work)

Hamish

  Changed 4 years ago by hamish

(but I do not like the idea of having two different modules, one for grass63 and one for grass64, even though they can be selected during compilation)

... ok, leave it as buffer= then.

H

  Changed 4 years ago by pcav

  • status changed from closed to reopened
  • resolution fixed deleted

I reopen the ticket, to remember changing the option when grass63 will be deprecated, and no longer widely available.

follow-ups: ↓ 9 ↓ 10   Changed 4 years ago by pcav

  • summary changed from parameter name changed in v.buffer from GRASS 6.3 to GRASS 6.4 to parameter name changed in v.buffer and r.surf.fractal from GRASS 6.3 to GRASS 6.4

Same thing happens for r.surf.fractal (option d=float has been changed in option dimension=float), so it does not work with grass64

in reply to: ↑ 8   Changed 4 years ago by hamish

Replying to pcav:

Same thing happens for r.surf.fractal (option d=float has been changed in option dimension=float), so it does not work with grass64

that one should not matter, the parser will accept shorter names. See  http://grass.osgeo.org/wiki/Module_command_line_parser

I reopen the ticket, to remember changing the option when grass63 will be deprecated, and no longer widely available.

maybe better just to leave the XML file as it is and close the ticket. A stable GRASS 7 release may be a long time away.

Hamish

in reply to: ↑ 8   Changed 4 years ago by hamish

Replying to pcav:

Same thing happens for r.surf.fractal (option d=float has been changed in option dimension=float), so it does not work with grass64

Hamish ha scritto:

no? what is the exact error message?

Paolo:

option d not recognized

Using grep I can not find any trace of that message in the latest qgis trunk/ SVN or GRASS's libgis. Has it been retranslated?

does QGIS's grass toolbox double-check the module options using the 'g.module --interface-description' or does it just try to run what the programmer/user threw at it and see what happens?

?? Hamish

  Changed 4 years ago by hamish

  • cc grass-dev@… added

  Changed 4 years ago by pcav

An useful comment by neteler: I *feel* that it is a parsing problem in QGIS that might expect full names. If so it should not do so.

  Changed 4 years ago by pcav

  • milestone set to Version 1.0.3

  Changed 4 years ago by rugginoso

  • status changed from reopened to closed
  • resolution set to fixed

Fixed in commit r10903.

  Changed 4 years ago by pcav

  • status changed from closed to reopened
  • resolution fixed deleted

  Changed 4 years ago by pcav

  • owner changed from nobody to rugginoso
  • status changed from reopened to new

  Changed 4 years ago by pcav

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.