title: Create and check if point is inside polygon
body: <p>I have a <code>std::list</code> of 2D points and would like to test if one point <code>p</code> lies inside the polygon given by the vector. I already found that <code>boost::geometry</code> has a function <code>within</code> to test this. Unfortunately I seem to use it in the wrong way:</p>
  
  <pre><code>void someFunction(...) {
      namespace bpl = boost::polygon;
      typedef bpl::polygon_data&lt;double&gt; Polygon;
      typedef bpl::polygon_traits&lt;Polygon&gt;::point_type Point;
  
      Polygon polygon;
      std::vector&lt;Point&gt; points;
  
      for (std::list&lt;MyPointType&gt;::const_iterator it = myPolygonPoints.begin(); it != myPolygonPoints.end(); ++it) {
          points.push_back(Point(it-&gt;GetX(),it-&gt;GetY()));
      } 
  
      polygon.set(points.begin(),points.end());
      // ...
      if (!boost::geometry::within(Point(someX,someY),polygon)) {
          doSomething();
      }
      //...
  }
  </code></pre>
  
  <p>I get various compile errors, starting by unmatched types in the call of <code>within</code>.
  So what is the correct way to build a polygon and use it with <code>within</code>?</p>
  
  <p>Greetings </p>