Subject: Re: [geometry] Compatibility with Boost.Units
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2015-10-08 15:24:29
Jeremy Murphy wrote:
> I recently tried using Boost.Units' SI length as the coordinate type
> for geometry and, well, it didn't work: specifically, the BG
> algorithms didn't compile. I'm not that familiar with Boost.Units so
> maybe I'm using the wrong unit.
> Should it be possible to do this (use an SI unit as the coordinate type)?
Boost.Geometry wasn't tested with Boost.Units' coordinates so it's
probable that they aren't supported. Using length units as cartesian
coordinates seems to be ok. Though I can imagine that something may
easily go wrong in places where e.g. coordinate type is used to store
the result of multiplication of coordinates, so basically in the whole
library. AFAIU the unit of a product should be squared unit of
coordinate. I'm not familiar with Boost.Unit neither but I guess that
Boost.Unit requires to use a different type of it. Is that correct? If
that's true, supporting Boost.Unit may be out of our reach, at while
Boost.Geometry supports C++03.
What errors are reported exactly?
Geometry list run by mateusz at loskot.net