title: Shapely .contains() method but including boundaries?
body: <p>I'm working with Shapely polygons and I need a way to delete all smaller polygons contained within a bigger polygon. I tried using the <code>.contains()</code> method which Shapely provides, but the method doesn't return <code>True</code> if a given smaller polygon isn't completely inside of the bigger, &quot;parent&quot; polygon.</p>
  <p>Basically, I want a method like <code>.contains()</code> but that it returns <code>True</code> in case the inner polygon shares boundaries with the outer polygon like on the example image below.</p>
  <p><img src="https://i.stack.imgur.com/pmhpn.png" alt="here" />.</p>
  <p>Here are the polygons from the picture presented in wkt format:</p>
  <p>The green one:</p>
  <pre><code>POLYGON Z ((14.4265764858233823 45.3396418051734784 0.0000000000000000, 14.4267228266679606 45.3395430970275015 0.0000000000000000, 14.4266753563381904 45.3394727193694536 0.0000000000000000, 14.4265290154936121 45.3395714275154376 0.0000000000000000, 14.4265764858233823 45.3396418051734784 0.0000000000000000))`  
  </code></pre>
  <p>The red one:</p>
  <pre><code>POLYGON Z ((14.4265450394689161 45.3395951840357725 0.0000000000000000, 14.4265695507109317 45.3395786509942837 0.0000000000000000, 14.4265802185605700 45.3395944667317679 0.0000000000000000, 14.4265982245953417 45.3395823215079616 0.0000000000000000, 14.4265715327703994 45.3395427492501426 0.0000000000000000, 14.4265290154936121 45.3395714275154376 0.0000000000000000, 14.4265450394689161 45.3395951840357725 0.0000000000000000))
  </code></pre>
  <p>I also tried using the <code>.intersects()</code> method but it returns <code>True</code> for polygons outside of a given polygon which have some common boundaries, which I do not want.</p>
  <p>I hope you understand what I need and I'm thankful if someone knows a solution to this.</p>