Source: https://gdsl-ul.github.io/san/spatial_analysis_notes.pdf