[QGIS-ZA-user] aggregate crime attribute data from SAPS Station boundaries to Wards

Arthur TAUTE Arthur.Taute at smec.com
Tue Oct 2 23:22:08 PDT 2018


Hi,
I would do it in PostGIS as a first choice by finding the appropriate function.
In QGIS I guess one needs to use the intersection tool and then load the result into a spreadsheet and do a pivot table per ward

Regards

Arthur Taute | Chief Technical Principal
SMEC South Africa
230 Albertus Street, La Montagne, Pretoria, South Africa, 0184
T +27 (12) 481 3821 | F +27 (12) 803 7943 | M +27 (83) 274 8885
arthur.taute at smec.com<mailto:arthur.taute at smec.com> | www.smec.com<http://www.smec.com/> | LinkedIn<http://www.linkedin.com/company/smec>
____________________________________________________
SMEC SNOWY MOUNTAINS ENGINEERING CORPORATION

Local People. Global Experience.

Disclaimer: The information contained in this e-mail and any attachment file is confidential. It is intended for the addressee, and may not be used, reproduced, disclosed or distributed without SMEC's permission. SMEC accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files.

Please consider the environment before printing this email.

From: qgis-za-user [mailto:qgis-za-user-bounces at lists.osgeo.org] On Behalf Of Tim Sutton via qgis-za-user
Sent: 02 October 2018 01:38 PM
To: South Africa QGIS user group <qgis-za-user at lists.osgeo.org>
Cc: Tim Sutton <tim at kartoza.com>
Subject: Re: [QGIS-ZA-user] aggregate crime attribute data from SAPS Station boundaries to Wards

Hi Brian

This should be fairly easy to do in QGIS without using any special plugins if you don’t mind doing a few steps. Can you share the datasets you want to use with me and I will see if I can come up with an easy workflow for you?

Regards

Tim


On 02 Oct 2018, at 10:57, Brian O'Leary via qgis-za-user <qgis-za-user at lists.osgeo.org<mailto:qgis-za-user at lists.osgeo.org>> wrote:

Dear QGis SA,

I would like to know if there is a QGis tool that can assist with the following task.  I want to transfer crime attribute data from SAPS Station boundaries to Ward boundaries, assuming that crime is evenly distributed within the SAPS Station boundary.

Previously I have done this task in Arc View using a script called DataPart.avx which was written by Jianwei Dou in 2002.  The below simplified sketch illustrates what I am trying to do in Qgis.  The SAPS Station shape has the data attributes and the Ward shape is the overlay or boundary shape. The output that I need is an attribute table that has calculated the % intersection of the SAPS Station by the ward boundaries and aggregated the crime attributes to a Ward table based on the % intersection.  In the below sketch the ward boundaries intersect the SAPS Station boundary by 50% in both cases.  As there were 100 crimes in the SAPS Station boundary the output table lists Wards 1 and 2 with 50 crimes in each.

<image.png>
Any advise most welcome.

Regards
Brian O'Leary



_______________________________________________
qgis-za-user mailing list
qgis-za-user at lists.osgeo.org<mailto:qgis-za-user at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/qgis-za-user

—


[cid:image001.jpg at 01D45AF2.2DD2C440]




Tim Sutton

Co-founder: Kartoza
Ex Project chair: QGIS.org<https://urldefense.proofpoint.com/v2/url?u=http-3A__QGIS.org&d=DwMFaQ&c=smhuqwfPwWSMyaibamWBQA&r=i-HHAe_D_s6l3U9xyATSOWTmAMX2qe4okWKiQbXajo8&m=2eaVbGTy98mFaEHSesD54JT3UZqYeE7Zu65k0yByLBw&s=-HULmDragl1QT4SK-R1B71P44Til_nyTO90O5uUF644&e=>

Visit http://kartoza.com<https://urldefense.proofpoint.com/v2/url?u=http-3A__kartoza.com_&d=DwMFaQ&c=smhuqwfPwWSMyaibamWBQA&r=i-HHAe_D_s6l3U9xyATSOWTmAMX2qe4okWKiQbXajo8&m=2eaVbGTy98mFaEHSesD54JT3UZqYeE7Zu65k0yByLBw&s=cfvyTS8GHZ0Rr9R_gUUiV-T4u9mz3C6rpNqrjJNEdDk&e=> 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<https://urldefense.proofpoint.com/v2/url?u=http-3A__freenode.net&d=DwMFaQ&c=smhuqwfPwWSMyaibamWBQA&r=i-HHAe_D_s6l3U9xyATSOWTmAMX2qe4okWKiQbXajo8&m=2eaVbGTy98mFaEHSesD54JT3UZqYeE7Zu65k0yByLBw&s=v4qRYBIQwfs84wDncsW5hNC2ptwRNqUPc1befQ4oMrI&e=>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-za-user/attachments/20181003/6a867b22/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 6122 bytes
Desc: image001.jpg
URL: <http://lists.osgeo.org/pipermail/qgis-za-user/attachments/20181003/6a867b22/attachment-0001.jpg>


More information about the qgis-za-user mailing list