Opened 15 years ago

Closed 15 years ago

#1629 closed bug (fixed)

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@…
Must Fix for Release: No Platform: All
Platform Version: 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 (17)

comment:1 by neteler, 15 years ago

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

comment:2 by neteler, 15 years ago

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

comment:3 by pcav, 15 years ago

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)

comment:4 by neteler, 15 years ago

Resolution: fixed
Status: newclosed

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.

comment:5 by hamish, 15 years ago

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

comment:6 by hamish, 15 years ago

(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

comment:7 by pcav, 15 years ago

Resolution: fixed
Status: closedreopened

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

comment:8 by pcav, 15 years ago

Summary: parameter name changed in v.buffer from GRASS 6.3 to GRASS 6.4parameter 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 comment:9 by hamish, 15 years ago

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 comment:10 by hamish, 15 years ago

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

comment:11 by hamish, 15 years ago

Cc: grass-dev@… added

comment:12 by pcav, 15 years ago

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.

comment:13 by pcav, 15 years ago

Milestone: Version 1.0.3

comment:14 by rugginoso, 15 years ago

Resolution: fixed
Status: reopenedclosed

Fixed in commit r10903.

comment:15 by pcav, 15 years ago

Resolution: fixed
Status: closedreopened

comment:16 by pcav, 15 years ago

Owner: changed from nobody to rugginoso
Status: reopenednew

comment:17 by pcav, 15 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.