Determine & Plot if Polygon intersects shoreline

Hi there,

I’m new to PyGMT - I’ve been trying to play around with it for a bit not but I’m banging my head against the wall a bit; hoping someone can help me get moving in the right direction.

I want to determine if a polygon (some closed grouping of lines) intersects a shoreline, or if it is entirely within the ocean. Ideally I’d like to be able to define this polygon as a series of straight lines (such as a triangle with three x,y points) and be able to determine if it intersects the shore.

I’d then like to plot the region, as well as the shape, in a figure.

Anybody have any recommendations about how to go about this?