title: Boost::Geometry - Find area of 2d polygon in 3d space?
body: <p>I'm trying to get area of 2d polygon in 3d space. Is there any way to do this by Boost::Geometry? Here is my implementation, but it returns 0 all the time:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  #include &lt;boost/geometry.hpp&gt;
  #include &lt;boost/geometry/geometries/point_xy.hpp&gt;
  #include &lt;boost/geometry/geometries/polygon.hpp&gt;
  #include &lt;boost/geometry/io/wkt/wkt.hpp&gt;
  
  namespace bg = boost::geometry;
  
  typedef bg::model::point&lt;double, 3, bg::cs::cartesian&gt; point3d;
  
  int main()
  {
      bg::model::multi_point&lt;point3d&gt; square;
      bg::read_wkt("MULTIPOINT((0 0 0), (0 2 0), (0 2 2), (0 0 2), (0 0 0))", square);
      double area = bg::area(square);
      std::cout &lt;&lt; "Area: " &lt;&lt; area &lt;&lt; std::endl;
  
      return 0;
  }
  </code></pre>
  
  <p><em>UPD</em>: Actually, I have the same issue with the simple 2d multi point square:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  #include &lt;boost/geometry.hpp&gt;
  #include &lt;boost/geometry/geometries/point_xy.hpp&gt;
  #include &lt;boost/geometry/geometries/polygon.hpp&gt;
  #include &lt;boost/geometry/io/wkt/wkt.hpp&gt;
  
  namespace bg = boost::geometry;
  
  typedef bg::model::point&lt;double, 2, bg::cs::cartesian&gt; point2d;
  
  int main()
  {
      bg::model::multi_point&lt;point2d&gt; square;
      bg::read_wkt("MULTIPOINT((0 0), (2 0), (2 2), (0 2))", square);
      double area = bg::area(square);
      std::cout &lt;&lt; "Area: " &lt;&lt; area &lt;&lt; std::endl;
  
      return 0;
  }
  </code></pre>
  
  <p>Here is the result:</p>
  
  <pre><code>$ ./test_area
  Area: 0
  </code></pre>
  
  <p><strong>UPD</strong>: Looks like area calculation in the <code>boost::geometry</code> availabe only for the 2 dimensional polygons.</p>