I have a SpatialLinesDataFrame that was produced from a contour of marine environmental data. The contour is not closed where it meets land. I would like to close the contour so that I can calculate the area within the contour. I have a shapefile for the coastline.
So, I would like to use the coastline shapefile to close the contour lines.
Edit: Here's an image illustrating what I am trying to do. The black line is the contour and the red is the coastline. I want the area enclosed by the black areas.