remove duplicate code
remove duplicate code

mdiener21/python-geospatial-analysis-cookbook,mdiener21/python-geospatial-analysis-cookbook,mdiener21/python-geospatial-analysis-cookbook,mdiener21/python-geospatial-analysis-cookbook