I have downloaded bathymetric data but the submarine contours - at 10m intervals - have gaps. Many gaps - the -10m (submarine) contour has over 700 gaps. So I need a programmatic way of either dealing with the gaps i.e. connecting the neighbouring endpoints and thus filling them in; or a way of highlighting the end points of each part so that I can find them and go to them. But I would assume that if I can identify the endpoints of each part, then it should be possible to programmatically connect the two endpoints that are closest together. Unfortunately I do not have the original tif file that the contours came from, nor do I know whence it came. The area I am looking at is offshore SW Ireland to a depth of about 150 m.
Here is an image of an example of the original gapped contour problem