Mapping a set of random points to a uniform lattice
Given a set of N polygons corresponding to countries/regions/municipalities find a regular tessellation of N triangles, squares, or hexagons where each tile corresponds to a country such that the original spatial arrangement is preserved as much as possible.
More generally, find a mapping from a set of N arbitrary/random points whilst preserving the original arrangement.
The code in this repository is experimental. For an excellent/stable R package solution to this problem, see Joseph Bailey's geogrid.
My first approach to this problem makes use of Linear Programming.
Cbc (Coin-or branch and cut) is an open-source mixed integer programming solver. It is faster than the GNU Linear Programming Kit (GLPK).
git clone --branch=stable/2.9 https://github.com/coin-or/Cbc Cbc-2.9
cd Cbc-2.9
git clone --branch=stable/0.8 https://github.com/coin-or-tools/BuildTools/
chmod 0700 BuildTools/get.dependencies.sh
BuildTools/get.dependencies.sh fetch
./configure --prefix=/usr/local --enable-cbc-parallel
make
sudo make install
verify parallel enabled
cbc -threads 8 -unitTest -dirMiplib=_MIPLIB3DIR_ -miplib
My second approach to this problem makes use of the popular Simulated Annealing metaheuristic.
-
Formulating Linear and Integer Linear Programs: A Rogues' Gallery
-
Area Cartograms: Their Use and Creation - Daniel Dorling. Appendix lists code for a circular force-directed/gravity method for cartogram generation. (see section 9 in book)
-
Let’s Tesselate: Hexagons For Tile Grid Maps - NPR visuals.
-
Integer Linear Programming Model approach) - interesting formulation.
-
Area Cartograms: Their Use and Creation - Daniel Dorling, 1996.
-
US as an hexagonal map - Formalisation of problem as an Integer Programming Model.
-
Hexagonal Grids - Distances, path-finding and geometry.
-
ONS - Visualising your constituency - Geographic cartogram of UK.
-
Something About The Automated Stippling Drawing - Very interesting.
-
Conceptualisation of a D3 linked view with a hexagonal cartogram
-
Crystallographic defect - Clues from defective lattice? Perform Annealing?
-
Crystallisation -- Simulate
-
New metastable form of ice and its role in the homogeneous crystallisation of water
-
Linear Assignment - mapping a set of size N to a a grid of size N. ***