You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the existing Boost.Geometry linestring and polygon models the
within(linestring, polygon)
function call compiles fine. But when I'm switching out the existing Boost.Geometry linestring model with my own type (which I registered as a linestring) compilation fails.
Here is a small self-contained test case reproducing this issue:
#include<vector>
#include<boost/geometry/geometry.hpp>
#include<boost/geometry/geometries/geometries.hpp>
#include<boost/geometry/geometries/register/point.hpp>
#include<boost/geometry/geometries/register/linestring.hpp>structmyPoint { float x, y; };
structmyLine { std::vector<myPoint> pts; };
BOOST_GEOMETRY_REGISTER_POINT_2D(myPoint, float, cs::spherical_equatorial<degree>, x, y)
BOOST_GEOMETRY_REGISTER_LINESTRING(std::vector<myPoint>)
using bgPoint = boost::geometry::model::point<float, 2, boost::geometry::cs::spherical_equatorial<boost::geometry::degree>>;
using bgPoly = boost::geometry::model::polygon<bgPoint>;
intmain() {
myLine ln;
bgPoly ply;
boost::geometry::within(ln.pts, ply); // does not compile// but this does, although I expected this to be exactly the same////using bgLine = boost::geometry::model::linestring<bgPoint>;//bgLine ln2;//boost::geometry::within(ln2, ply);
}
This is surprising to me since both types are spherical equatorial, float precision, degree unit. There is no semantic difference from what I can see. I expected them to behave identically.
I have the following use-case: check if a linestring is within a polygon.
Coordinate system is Spherical Equatorial.
The support-matrix in the documentation says this should work.
When I use the existing Boost.Geometry linestring and polygon models the
function call compiles fine. But when I'm switching out the existing Boost.Geometry linestring model with my own type (which I registered as a linestring) compilation fails.
Here is a small self-contained test case reproducing this issue:
This is surprising to me since both types are spherical equatorial, float precision, degree unit. There is no semantic difference from what I can see. I expected them to behave identically.
Here is the full error log. Boost version is 1.62 beta1.
https://gist.github.com/daniel-j-h/64bae0c01caaff30c2e40d27f7a98406
The text was updated successfully, but these errors were encountered: