title: Boost polygon union result is differing between windows and linux
body: <p>I am trying to get a union of all the individual polygons via boost geometry. But oddly the results seem to vary between windows and centOS.</p>
  <p>The result is coming out right one (the one i expect) in windows BUT in linux its odd. In linux it shows result as two split polygons.</p>
  <p>In Windows i get</p>
  <pre><code>MULTIPOLYGON(((0 -0,0 2996,1490 2996,2980 2996,2980 -0,0 -0)))
  </code></pre>
  <p>But in centOS same set of inputs, give result as</p>
  <pre><code>MULTIPOLYGON(((1490 2996,2980 2996,2980 -0,1490 -0,1490 2996)),((0 2996,1490 2996,1490 -0,0 -0,0 2996)))
  </code></pre>
  <p>Its baffling for me as the code trying to compute polygons union is same. I don't understand why the linux output is coming out with a split line in between polygons. That's not how a union output should look like.</p>
  <p>Can anyone point out what is that i am doing wrong in below code? Or any other pointers which i could try to see whats going wrong.</p>
  <pre><code>#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/geometries/multi_polygon.hpp&gt;
  #include &lt;boost/geometry.hpp&gt;
  #include &lt;boost/geometry/geometries/geometries.hpp&gt;
  #include &lt;vector&gt;
  #include &lt;boost/geometry.hpp&gt;
  #include &lt;boost/geometry/io/wkt/wkt.hpp&gt;
  
  
  namespace boost {
      namespace geometry {
  
          typedef model::d2::point_xy&lt;double&gt; Point;
          typedef model::polygon&lt;Point&gt; Polygon;
          typedef model::segment&lt;Point&gt; Line;
  
      };
  };
  
  int main()
  {
  
  
          using multi_polygon = boost::geometry::model::multi_polygon&lt;boost::geometry::Polygon&gt;;
  
  
          boost::geometry::Polygon one, two,green;
  
  
  
          boost::geometry::read_wkt(&quot;POLYGON((0 2996, 1490 2996, 1490 -0, 0 -0, 0 2996))&quot;, one);
  
          boost::geometry::read_wkt(&quot;POLYGON((1490 2996, 2980 2996, 2980 -0, 1490 -0, 1490 2996))&quot;, two);
  
          multi_polygon polyUnion;
          std::vector&lt;boost::geometry::Polygon&gt; vectorOfPolygons;
  
          vectorOfPolygons.emplace_back(one);
          vectorOfPolygons.emplace_back(two);
  
  
          // Create the union of all the polygons of the datasets
          for (const boost::geometry::Polygon&amp; p : vectorOfPolygons) {
              multi_polygon tmp;
              boost::geometry::union_(polyUnion, p, tmp);
              polyUnion = tmp;
              boost::geometry::clear(tmp);
          }
  
          std::string str;
          bool valid = boost::geometry::is_valid(polyUnion, str);
  
          if (!valid)
          {
              boost::geometry::correct(polyUnion);
          }
  
          std::cout &lt;&lt; &quot;Result of union&quot; &lt;&lt; boost::geometry::wkt(polyUnion) &lt;&lt; &quot;\n&quot;;
  
  }
  </code></pre>