<div dir="ltr">sure. usually, I don't backport, but I'll check the wiki. Thanks.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 20, 2017 at 3:11 AM, Martin Landa <span dir="ltr"><<a href="mailto:landa.martin@gmail.com" target="_blank">landa.martin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<span class=""><br>
2017-02-20 8:58 GMT+01:00 Huidae Cho <<a href="mailto:grass4u@gmail.com">grass4u@gmail.com</a>>:<br>
> no problem, I'll backport it.<br>
<br>
</span>ok, thanks for taking care about it. Note that only bugfixes or<br>
cosmetics issues (we are close to freeze period) should be backported<br>
to relb72. After releasing 7.2.1 also non-bug (minor new<br>
functionality) issues can be backported. It's good to note such<br>
waiting backports on wiki [1]. Ma<br>
<br>
[1] <a href="https://trac.osgeo.org/grass/wiki/Grass7Planning#a7.2.2tobebackported" rel="noreferrer" target="_blank">https://trac.osgeo.org/grass/<wbr>wiki/Grass7Planning#a7.2.<wbr>2tobebackported</a><br>
<div class="HOEnZb"><div class="h5"><br>
>> >              if cols[catcol] == '-1' or cols[catcol] == '0':<br>
>> >                  continue<br>
>> > @@ -115,7 +116,6 @@<br>
>> ><br>
>> >          if len(records1) == 0:<br>
>> >              try:<br>
>> > -                f = grass.vector_db(map=mapname)[<wbr>int(layer)]<br>
>> >                  grass.fatal(_("There is a table connected to input<br>
>> > vector map '%s', but "<br>
>> >                                "there are no categories present in the<br>
>> > key column '%s'. Consider using "<br>
>> >                                "v.to.db to correct this.") % (mapname,<br>
>> > f['key']))<br>
>> > @@ -142,6 +142,7 @@<br>
>> >          for r2 in records2:<br>
>> >              records3.append(filter(lambda r1: r1[catcol] == r2[0],<br>
>> > records1)[0] + r2[1:])<br>
>> >      else:<br>
>> > +        catcol = 0<br>
>> >          records1 = []<br>
>> >          p = grass.pipe_command('v.<wbr>category', inp=mapname, layer=layer,<br>
>> > option='print')<br>
>> >          for line in p.stdout:<br>
>> > @@ -172,15 +173,18 @@<br>
>> >      numcols = len(colnames) + len(extracolnames)<br>
>> ><br>
>> >      # calculate percents if requested<br>
>> > -    if units != '' and units in ['p', 'percent']:<br>
>> > -        # calculate total area value<br>
>> > -        areatot = 0<br>
>> > +    if units == 'percent' and option != 'coor':<br>
>> > +        # calculate total value<br>
>> > +        total = 0<br>
>> >          for r in records3:<br>
>> > -            areatot += float(r[-1])<br>
>> > +            total += float(r[-1])<br>
>> ><br>
>> > -        # calculate area percentages<br>
>> > -        records4 = [float(r[-1]) * 100 / areatot for r in records3]<br>
>> > -        records3 = [r1 + [r4] for r1, r4 in zip(records1, records4)]<br>
>> > +        # calculate percentages<br>
>> > +        records4 = [float(r[-1]) * 100 / total for r in records3]<br>
>> > +        if type(records1[0]) == int:<br>
>> > +            records3 = [[r1] + [r4] for r1, r4 in zip(records1,<br>
>> > records4)]<br>
>> > +        else:<br>
>> > +            records3 = [r1 + [r4] for r1, r4 in zip(records1,<br>
>> > records4)]<br>
>> ><br>
>> >      # sort results<br>
>> >      if options['sort']:<br>
>> ><br>
>> > ______________________________<wbr>_________________<br>
>> > grass-commit mailing list<br>
>> > <a href="mailto:grass-commit@lists.osgeo.org">grass-commit@lists.osgeo.org</a><br>
>> > <a href="https://lists.osgeo.org/mailman/listinfo/grass-commit" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/grass-commit</a><br>
>><br>
>><br>
>><br>
>> --<br>
>> Martin Landa<br>
>> <a href="http://geo.fsv.cvut.cz/gwiki/Landa" rel="noreferrer" target="_blank">http://geo.fsv.cvut.cz/gwiki/<wbr>Landa</a><br>
>> <a href="http://gismentors.cz/mentors/landa" rel="noreferrer" target="_blank">http://gismentors.cz/mentors/<wbr>landa</a><br>
><br>
><br>
<br>
<br>
<br>
--<br>
Martin Landa<br>
<a href="http://geo.fsv.cvut.cz/gwiki/Landa" rel="noreferrer" target="_blank">http://geo.fsv.cvut.cz/gwiki/<wbr>Landa</a><br>
<a href="http://gismentors.cz/mentors/landa" rel="noreferrer" target="_blank">http://gismentors.cz/mentors/<wbr>landa</a><br>
</div></div></blockquote></div><br></div>