Refactor code with coastlines to identify problems of basemap