[GRASS-dev] [GRASS-SVN] r63958 - grass/trunk/scripts/v.to.lines

Anna Petrášová kratochanna at gmail.com
Tue Jan 6 07:27:17 PST 2015


On Tue, Jan 6, 2015 at 3:10 AM, Markus Neteler <neteler at osgeo.org> wrote:

> On Mon, Jan 5, 2015 at 9:36 PM, <svn_grass at osgeo.org> wrote:
> >
> > Author: hellik
> > Date: 2015-01-05 12:36:58 -0800 (Mon, 05 Jan 2015)
> > New Revision: 63958
> >
> > Modified:
> >    grass/trunk/scripts/v.to.lines/v.to.lines.py
> > Log:
> > v.to.lines: strip mapset
> >
> > Modified: grass/trunk/scripts/v.to.lines/v.to.lines.py
> > ===================================================================
> > --- grass/trunk/scripts/v.to.lines/v.to.lines.py        2015-01-05
> 19:32:08 UTC (rev 63957)
> > +++ grass/trunk/scripts/v.to.lines/v.to.lines.py        2015-01-05
> 20:36:58 UTC (rev 63958)
> > @@ -47,7 +47,7 @@
> >
> >  def main():
> >      # Get the options
> > -    input = options["input"]
> > +    input = options["input"].split('@')[0]
> >      output = options["output"]
> >      method = options["method"]
> >      min_cat = None
>
>
> Hi Helli,
>
> why is this needed? In most Python scripts I haven't seen it.
> If the same map name exists in different mapsets in the SEARCH_PATH,
> how would it pick the selected one?
>

yes, it shouldn't be there like this. The motivation is probably that the
input map name is used to construct temporary map names, so you want to
avoid the mapset part there. But the mapset must be propagated into the
called modules when it is an input map. I hopefully fixed that in
http://trac.osgeo.org/grass/changeset/63965 and backported but I didn't
really tested it.


Anna

>
> thanks for hints,
> Markus
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20150106/2a8467ec/attachment.html>


More information about the grass-dev mailing list