Hi Brook,

Brook Milligan Via Geometry wrote:

Brook Milligan Via Geometry wrote:

Boost.Geometry documentation clearly implies that in (almost?) all cases header files can be included in either of two ways, either as a general "include everything" header (boost/geometry.hpp) or as a more specific header (e.g., boost/geometry/algorithms/is_valid.hpp). In most cases this works fine. However, in some cases the more specific headers are not sufficient and additional files must be included. One example of this is that boost/geometry/algorithms/is_valid.hpp requires prior inclusion of boost/geometry/core/cs.hpp to define cs_tag. Additionally, it requires (not necessarily prior) inclusion of boost/geometry.hpp for other definitions. This latter situation applies to a number of other algorithms. Thus, it appears that certain files in Boost.Geometry do not include an appropriate set of other files to provide all the required definitions, and therefore cannot be used as implied by the documentation.

The intention is to allow users to include parts of the code using one of the following:

1. the whole library

boost/geometry.hpp

2. single algorithm + all strategies, e.g.:

boost/geometry/algorithms/is_valid.hpp + boost/geometry/strategies/strategies.hpp

3. single algorithm + specific strategies required by this algorithm for specific coordinate system and arguments, e.g.:

boost/geometry/algorithms/is_valid.hpp + boost/geometry/strategies/cartesian/intersection.hpp + boost/geometry/strategies/cartesian/side_by_triangle.hpp + boost/geometry/strategies/cartesian/area.hpp + whatever else is needed

Obviously this is not very well documented.

What is the mechanism for fixing this?

If something else fail, e.g. as you mentioned some includes from the internals are missing (core, util, formulas, etc.) then this is a bug and you can create an issue or prepare pull request at GitHub (https://github.com/boostorg/geometry).

Adam