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
centroid not working without main geometry header #792
Comments
You need to include the stategies for centroid. |
@vissarion thanks !. With the "strategies" include it works, but the doc's don't say anything about it. I'l go trough the code and figure out why exactly the strategies header is required here. |
I bisected (fortunately Boost.Geometry a header-only library so adding the include directory sufficed) and boostorg/geometry@6eb9e23 is where this problem starts for us. See also boostorg/geometry#792 - the easiest fix for all such issues is to just include the project header `boost/geometry/geometry.hpp`. In this particular case, if you look at the commit where grid_tools.cc fails to compile, its because we were relying on some implicit includes. In particular, we need the distance header to find the distance between points and boxes, but that was previously included elsewhere.
I bisected (fortunately Boost.Geometry a header-only library so adding the include directory sufficed) and boostorg/geometry@6eb9e23 is where this problem starts for us. See also boostorg/geometry#792 - the easiest fix for all such issues is to just include the project header `boost/geometry/geometry.hpp`. In this particular case, if you look at the commit where grid_tools.cc fails to compile, its because we were relying on some implicit includes. In particular, we need the distance header to find the distance between points and boxes, but that was previously included elsewhere.
I bisected (fortunately Boost.Geometry a header-only library so adding the include directory sufficed) and boostorg/geometry@6eb9e23 is where this problem starts for us. See also boostorg/geometry#792 - the easiest fix for all such issues is to just include the project header `boost/geometry/geometry.hpp`. In this particular case, if you look at the commit which causes grid_tools.cc fails to compile, its because we were relying on some implicit includes. In particular, we need the distance header to find the distance between points and boxes, but that was previously included in another file.
I bisected (fortunately Boost.Geometry a header-only library so adding the include directory sufficed) and boostorg/geometry@6eb9e23 is where this problem starts for us. See also boostorg/geometry#792 - the easiest fix for all such issues is to just include the project header `boost/geometry/geometry.hpp`. In this particular case, if you look at the commit which causes grid_tools.cc fails to compile, its because we were relying on some implicit includes. In particular, we need the distance header to find the distance between points and boxes, but that was previously included in another file.
I bisected (fortunately Boost.Geometry a header-only library so adding the include directory sufficed) and boostorg/geometry@6eb9e23 is where this problem starts for us. See also boostorg/geometry#792 - the easiest fix for all such issues is to just include the project header `boost/geometry/geometry.hpp`. In this particular case, if you look at the commit which causes grid_tools.cc fails to compile, its because we were relying on some implicit includes. In particular, we need the distance header to find the distance between points and boxes, but that was previously included in another file.
I bisected (fortunately Boost.Geometry a header-only library so adding the include directory sufficed) and boostorg/geometry@6eb9e23 is where this problem starts for us. See also boostorg/geometry#792 - the easiest fix for all such issues is to just include the project header `boost/geometry/geometry.hpp`. In this particular case, if you look at the commit which causes grid_tools.cc fails to compile, its because we were relying on some implicit includes. In particular, we need the distance header to find the distance between points and boxes, but that was previously included in another file.
This is fixed in boost |
I bisected (fortunately Boost.Geometry a header-only library so adding the include directory sufficed) and boostorg/geometry@6eb9e23 is where this problem starts for us. See also boostorg/geometry#792 - the easiest fix for all such issues is to just include the project header `boost/geometry/geometry.hpp`. In this particular case, if you look at the commit which causes grid_tools.cc fails to compile, its because we were relying on some implicit includes. In particular, we need the distance header to find the distance between points and boxes, but that was previously included in another file.
When I try to use the centroid or return_centroid function, by including the bare minimum (#include <boost/geometry/algorithms/centroid.hpp>) it doesn't seem to compile.("error: no type named 'state_type'")
If I add the "#include<boost/geometry.hpp>" header things work just fine. Is this by design? or a bug?
example code:
Or on compiler explorer: https://godbolt.org/z/Wdcb6f
The text was updated successfully, but these errors were encountered: