Skip to content

Facón subdivides and aggregates polygonal geometries

License

Notifications You must be signed in to change notification settings

sanapolsky/facon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Facón

Facón is an experimental python library for subdividing a GeoDataFrame of administrative boundaries into a new GeoDataFrame of approximately equal area zones with evenly distributed centres constrained by the boundaries of the original geometries. It is intended to work with projected administrative areas with their coordinates in metres. A target area in metres squared is used to determine how many subdivisions should be created. It was developed in collaboration with Sebastián Anapolsky @sanapolsky.

Working with subdivisions

Administrative boundaries are typically driven by a need to maintain an approximately equal population in each area while maintaining spatial contiguity (i.e. no gaps between the zones). These constraints can lead to administrative areas that vary greatly in area (m2).

Greater London boroughs, Ciudad Autónoma de Buenos Aires comunas "Greater London boroughs, Ciudad Autónoma de Buenos Aires comunas")

Transport analysis in contrast tends to take a regular (square or hexagonal) grid as its starting point, creating a set of zones of equal area with an equal distance from the centre of one zone to the centre of the next.

These two approaches to subdivisions conflict when, for example, carrying out studies into the relationship between social indicators from census data and the time/cost of travel.

A hybrid solution

Facón proposes a hybrid solution, creating approximately equal area zones with approximately evenly spaced centres that nevertheless respect the original administrative boundaries. It uses K-Means clustering to define the subdivisions and their centroids and voronoi regions to create the boundaries. It benefits from the fact that K-Means creates a predefined number of clusters (here determined by dividing the area (m2) of the administrative zone by the desired target area (m2) of the new zones) that are approximately circular.

Greater London boroughs, Ciudad Autónoma de Buenos Aires comunas subdivided "Greater London boroughs, Ciudad Autónoma de Buenos Aires comunas subdivided")

References

It was inspired by two prior pieces of work:

Geovoronoi is a python library for generating voronoi regions inside an administrative boundary given a set of predetermined starting points. The regions that it generates are driven by a set of given centres and are not necessarily of similar area.

This post by Paul Ramsey on achieving the desired result with PostGIS was instrumental in pointing the way to using K-Means clustering to subdivide the polygons into approximately equal areas.

About

Facón subdivides and aggregates polygonal geometries

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 98.0%
  • Python 2.0%