Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot make 'point_on_surface' compile #1278

Closed
JD31 opened this issue May 3, 2024 · 4 comments
Closed

Cannot make 'point_on_surface' compile #1278

JD31 opened this issue May 3, 2024 · 4 comments

Comments

@JD31
Copy link

JD31 commented May 3, 2024

I don't manage to use 'point_on_surface'. (Maybe I don't use the right method??)

    typedef boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian> BGPoint;
    boost::geometry::model::polygon<BGPoint> poly;

    // ...

    BGPoint point;
    boost::geometry::point_on_surface(poly, point);

It does not build due to a static assert :

In template: static assertion failed due to requirement 'boost::geometry::detail::static_assert_check<false, boost::geometry::cartesian_tag>::value': Not implemented for this type.

in instantiation of template class 'boost::geometry::strategy::side::services::default_strategyboost::geometry::cartesian_tag' requested here in instantiation of function template specialization 'boost::geometry::point_on_surface<boost::geometry::model::polygon<boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>>, boost::geometry::model::point<double, 2, ...

@vissarion
Copy link
Member

Sorry, I cannot reproduce it. Could you please provide more information? That is, all the code you tried to compile. For example what headers are you including?

@JD31
Copy link
Author

JD31 commented May 17, 2024

Here is a Goldbolt link to an example that does not compile and with all the includes I use (lot are not necessary but it is representative of my build context):
https://godbolt.org/z/PK86ocnbc

@vissarion
Copy link
Member

You have to include also

#include <boost/geometry/strategies/strategies.hpp>

alternatively replace all boost geometry includes by #include <boost/geometry.hpp>.

@JD31
Copy link
Author

JD31 commented May 17, 2024

Right. Thank you.

@JD31 JD31 closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants