"Entirely contained" is an expression that could be ambiguous in spatial terms. Take a look at this post from Martin Davis. In NTS/JTS exists some spatial predicates that could fit your needs:
- Contains. Geometry A contains Geometry B iff no points of B lie in the exterior of A, and at least one point of the interior of B lies in the interior of A.
- Covers. Geometry A covers Geometry B iff no points of B lie in the exterior of A.
- ContainsProperly. Geometry A containsProperly Geometry B iff all points of B lie in the interior of A.
In NTS you could test this predicates like this:
IGeometry pol = ...;
IGeometry pol2 = ...;
// pol contains pol2
// pol covers pol2
IPreparedGeometry prepPol = PreparedGeometryFactory.Prepare(pol);
// pol properly contains pol2
In other cases, you could need a more advanced definition to test what you need. Take a look at the DE-9IM.
And here is hoy to test a custom predicate in NTS:
if (pol.Relate(pol2, "T*****FF*"))
// pol containspol2