I do have the code on GitHub now if you have time and inclination to take a look: https://github.com/jeremy-murphy/concave_hull

On 25 April 2018 at 09:51, Jeremy Murphy <jeremy.william.murphy@gmail.com> wrote:
Hi Adam,

On 24 April 2018 at 10:03, Jeremy Murphy <jeremy.william.murphy@gmail.com> wrote:
If that's the case then this means that your overloads of bg::intersects() are not used by the compiler.

Adding new kinds of geometries and implementing algorithms for them is more complex than writing an overload. If you want to go this way I could guide you but in general this shouldn't be needed.

With some compilers the order of includes WRT the overloads may be the problem. E.g. try to implement the overloads before the library is included or instead of writing a function template (with typename Box) write a function taking a specific box type. The R-tree uses bg::model::box<bg::model::point<CoordinateType, Dimension, CoordinateSystem>> where the three template attributes of bg::model::point are taken from the Indexable. Or you could take this type from the R-tree (it's rtree::bounds_type).

OK, I'll try changing the order of header inclusion. Is that a compiler defect that order of inclusion can make a difference? I'm currently using GCC 6.4.0, but I have GCC 7.3.0 and Clang 6.0.0 installed too.

Hmmm, not sure how to break the dependency there... I mean, the implementation of my intersects functions depend on the library, so I can't completely avoid including it first.

I already have the intersects overload for box specialized on model::box<T>, otherwise those two overloads would be ambiguous, so I have:

namespace boost { namespace geometry {
  template <typename Point, typename HemispherePoint>
  inline bool intersects(Point const& p, model::hemisphere<HemispherePoint> const& hs)

  template <typename Point, typename HemispherePoint>
  inline bool intersects(model::box<Point> const& b, model::hemisphere<HemispherePoint> const& hs)

Do I need to overload index::intersects too?