[OSGeo Africa] Python script

mmchari . martinmchari at gmail.com
Wed Aug 3 08:02:00 PDT 2016


Hi Admire

I modified the following code from the link suggested by Jacob and it
worked out perfect in ArcGIS.

http://gis.stackexchange.com/questions/169770/need-to-find-max-value-among-fields-and-print-field-name

Martin


On Mon, Aug 1, 2016 at 8:07 AM, Admire Nyakudya <addloe at gmail.com> wrote:

> Hi Martin
>
> On 31 Jul 2016 23:10, <martinmchari at gmail.com> wrote:
> >
> > Hi
> >
> > Am looking for a Python script for adding a new scores field to an
> attribute table and assigning scores to rows in fields in an attribute
> table.
>
> What have you tried?. If you need help on the list we expect you to have
> done some ground work and highlight areas where people could improve your
> code so that it could be efficient.
>
> > For example in a table with fields A, B, C, D. If maximum number in a
> row is in field B then assign score of 2. If it is in  field A score is 1,
> if field C score assign score of 3 in scores field.‎
>
> I suggest you look at some pyqgis documentation.
> http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/vector.html
>
> Also look at http://gis.stackexchange.com for similar questions and adapt
> the answer accordingly.
>
> Regards
> >
> > Kind regards
> >
> > Martin ‎
> > _______________________________________________
> > Africa mailing list
> > Africa at lists.osgeo.org
> > You can UNSUBSCRIBE at http://lists.osgeo.org/mailman/listinfo/africa
>
> _______________________________________________
> Africa mailing list
> Africa at lists.osgeo.org
> You can UNSUBSCRIBE at http://lists.osgeo.org/mailman/listinfo/africa
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/africa/attachments/20160803/64d6a8a5/attachment.html>


More information about the Africa mailing list