Monday 25 January 2016

qgis - How to add attributes in proportion to intersecting area from another layer



I am new to using QGIS. I have two polygon layers:



  1. Voronoi of Access Points

  2. Census block maps with population


I want to get number of people covered by each Access Point (Assuming uniform distribution of people within the blocks). I have tried two different approaches, both failing to get me the correct answer.



  1. Use join by location...sum of people covered by APs is 3x of people in the area.


  2. Multiple step approach




    • Calculate area of each block

    • Intersect block layer with voronoi, to clip blocks on AP boundary

    • Recalculate the area of clipped block layer

    • Calculated proportional population based on new clipped area and original area

    • Use join by location....sum of people covered by APs is 2x of people in the area.




In Join by location, I am using summary option for sum of all intersecting features.



In Mapinfo I am able to use proportional sum to get the number of people under each AP's coverage. I'll really appreciate if someone can point me in the right direction.


Thanks, Manish



Answer



You multiple step approach should work fine with a minor change.



  • Calculate proportional population based on new clipped area and original area

  • Generate Centroids for this clipped layer. Check if there are any centroids that are outside polygons.

  • do a spatial join, with centroids as join layer, check the sum property.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...