# [Boost-bugs] [Boost C++ Libraries] #12439: Problems with 180 and -180 meridian, using bg::cs::geographic<bg::degree>

Subject: [Boost-bugs] [Boost C++ Libraries] #12439: Problems with 180 and -180 meridian, using bg::cs::geographic<bg::degree>
Date: 2016-09-06 19:13:54

#12439: Problems with 180 and -180 meridian, using bg::cs::geographic<bg::degree>
----------------------------------------+---------------------------
Reporter: ostroukhov@â€¦ | Owner: barendgehrels
Type: Bugs | Status: new
Milestone: To Be Determined | Component: geometry
Version: Boost 1.61.0 | Severity: Problem
Keywords: geographic return_envelope |
----------------------------------------+---------------------------
While calculating the envelope:
{{{

#include <boost/range.hpp>
#include <boost/geometry/geometries/concepts/ring_concept.hpp>
#include <boost/geometry/geometries/register/ring.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>

namespace bg = boost::geometry;
namespace bgi = boost::geometry::index;

typedef bg::model::point<double, 2, bg::cs::geographic<
bg::degree>> point_t;
typedef bg::model::ring<point_t> ring_t;

ring_t ring {{-180, 0}, {180, 0}, {180, -85}, {-180, -85}, {-180, 0}};

auto aabb = bg::return_envelope< bg::model::box<point_t> >(ring);

std::cout << "max_corner lon ="
<< aabb.max_corner().get<0>();
std::cout << "min_corner lon ="
<< aabb.min_corner().get<0>();

}}}

It prints both max_corner and min_corner longitude as 180

```--
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12439>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
```

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC