[OSGeo Africa] Python script

Tim Sutton tim at kartoza.com
Mon Aug 1 04:07:38 PDT 2016


Hi

Also do you really need to do it in python? Its fairly trivial to do this kind of thing using the QGIS Attribute Table's field calculator too....

Regards

Tim
> On 01 Aug 2016, at 1:01 PM, Jacobus Strydom <jcstay123 at gmail.com> wrote:
> 
> Hi Martin,
> 
> Do you need to do it in QGIS or ArcGIS?
> 
> If it's in ArcGIS, have a look at this link, I think this might help.
> http://gis.stackexchange.com/questions/169770/need-to-find-max-value-among-fields-and-print-field-name <http://gis.stackexchange.com/questions/169770/need-to-find-max-value-among-fields-and-print-field-name>
> 
> For QGIS I'm not 100% sure, but it will be great to see how it's done in QGIS. So if anyone can help with a script in QGIS that will be great.
> 
> regards,
> 
> 
> 
> On Sun, Jul 31, 2016 at 11:10 PM, <martinmchari at gmail.com <mailto: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.
> 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.‎
> 
> Kind regards
> 
> Martin ‎
> _______________________________________________
> Africa mailing list
> Africa at lists.osgeo.org <mailto:Africa at lists.osgeo.org>
> You can UNSUBSCRIBE at http://lists.osgeo.org/mailman/listinfo/africa <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

—









Tim Sutton

Co-founder: Kartoza
Project chair: QGIS.org

Visit http://kartoza.com <http://kartoza.com/> to find out about open source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

Skype: timlinux
IRC: timlinux on #qgis at freenode.net

Kartoza is a merger between Linfiniti and Afrispatial

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/africa/attachments/20160801/304169b7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KartozaNewLogoThumbnail.jpg
Type: image/jpeg
Size: 6122 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/africa/attachments/20160801/304169b7/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.osgeo.org/pipermail/africa/attachments/20160801/304169b7/attachment-0001.sig>


More information about the Africa mailing list