This script is for converting polygon landuse polygon features in a shapefile that are attributed as settlements into a points.
The following are the steps involved:
- Import the tileset with shapefiles (need to iterate through the folder structure)
- Select the landuse layer from the list of shapefiles
- Sub-select the settlement areas from the landuse layer
- Calculate the area of the settlement areas
- Convert the polygon settlement areas into points
- Save the points within each tile folder
The following are the steps to merge and spatially join the points to respective admin boundaries
- Import the point shapefiles (need to iterate through the folder structure)
- Read the points as a list of input files as part of a list
- Merge all the points and save as a new set of point
- Calculate the XY Coordinates of the points(Use Decimal Degrees same as the Dataframe)
- Spatial join the admin boundaries for assigning the attributes(Use points as source and polygon as target vectors)
The following steps are to post-process the attribute data to calculate settlement population
- Summarize the above join output by name of the admin unit
- Join the summary table to the new join output layer
- Calculate the area ratio for each cluster point (Area of cluster/Sum of Cluster Area)
- Calculate the population/households for each cluster point using the above ratio and admin unit population