Refactor code in mapUtilities.js into two modules: mapcalc, and spatialsurvey.