Refactor .shp file reading