Three Essays On Continuous And Discrete Spatial Heterogeneity