Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v.to.rast: Change use=val to use=value #3110

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gui/wxpython/rlisetup/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def convertFeature(vect, outrast, cat, origrast, layer="1", overwrite=False):
input=tmp_vect,
type="area",
layer=layer,
use="val",
use="value",
value=cat,
output=outrast,
overwrite=overwrite,
Expand Down
4 changes: 3 additions & 1 deletion gui/wxpython/rlisetup/sampling_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,9 @@ def writeArea(self, coords, rasterName):
"r.to.vect", input=tmpraster, output=tmpvector, type="area", overwrite=True
)

RunCommand("v.to.rast", input=tmpvector, output=rasterName, value=1, use="val")
RunCommand(
"v.to.rast", input=tmpvector, output=rasterName, value=1, use="value"
)
wx.EndBusyCursor()
grass.use_temp_region()
grass.run_command("g.region", vector=tmpvector)
Expand Down
4 changes: 2 additions & 2 deletions scripts/r.mask/r.mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ def main():
input=to_rast_input,
layer=layer,
output="MASK",
use="val",
val="1",
use="value",
value="1",
type="area",
cats=cats,
where=where,
Expand Down
6 changes: 3 additions & 3 deletions vector/v.to.rast/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ int main(int argc, char *argv[])
use_opt->type = TYPE_STRING;
use_opt->required = YES;
use_opt->multiple = NO;
use_opt->options = "attr,cat,val,z,dir";
use_opt->options = "attr,cat,value,z,dir";
use_opt->description = _("Source of raster values");
desc = NULL;
G_asprintf(&desc, "attr;%s;cat;%s;val;%s;z;%s;dir;%s",
G_asprintf(&desc, "attr;%s;cat;%s;value;%s;z;%s;dir;%s",
_("read values from attribute table"), _("use category values"),
_("use value specified by value option"),
_("use z coordinate (points or contours only)"),
Expand Down Expand Up @@ -104,7 +104,7 @@ int main(int argc, char *argv[])
val_opt->required = NO;
val_opt->multiple = NO;
val_opt->answer = "1";
val_opt->description = _("Raster value (for use=val)");
val_opt->description = _("Raster value (for use=value)");

memory = G_define_standard_option(G_OPT_MEMORYMB);

Expand Down
4 changes: 2 additions & 2 deletions vector/v.to.rast/v.to.rast.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h2>NOTES</h2>
<li>
<em>cat</em> - read values from category
<li>
<em>val</em> - use value specified by <em><b>value</b></em> option
<em>value</em> - use value specified by <em><b>value</b></em> option
<li>
<em>z</em> - use z coordinate (points or contours only)
<li>
Expand Down Expand Up @@ -65,7 +65,7 @@ <h2>NOTES</h2>
<p>
Boundaries (usually without categories) can be rasterized with
<div class="code"><pre>
v.to.rast type=boundary layer=-1 use=val
v.to.rast type=boundary layer=-1 use=value
</pre></div>

<h2>EXAMPLES</h2>
Expand Down
Loading