Boost logo

Geometry :

Subject: Re: [geometry] bounding object calculation
From: Barend Gehrels (barend_at_[hidden])
Date: 2013-08-15 18:07:46

Hi Adam,

On 15-8-2013 23:18, Adam Wulkiewicz wrote:
> Hi,
> Barend Gehrels wrote:
>>> bg::envelope() and bg::return_envelope() will probably handle other
>>> bounding objects than Box. Am I right? Or some other name is choosen?
>> As said earlier, envelope is an OGC algorithm with a specific meaning
>> and the name is well-chosen. I guess more than 99% of the envelopes in
>> your postbox is rectangular. The association is OK.
>> So we might stick to PostGIS convention and call it
>> minimum_bounding_circle, or replace the circle with a "ball" or
>> "nsphere" suffix to denote dimensions higher than 2.
> I propose to choose a general name and implement a function
> calculating a bounding Geometry of arbitrary type. I'm using bounds()
> in the Index to return spatial index's bounding object. For example:
> typedef model::box<..> Box;
> Box box = return_bounds<Box>(some_geometry);
> bounds(other_geometry, box);
> typedef model::nsphere<..> Sph;
> Sph sph = return_bounds<Sph>(some_geometry);
> bounds(other_geometry, sph);
> This function could calculate bounding boxes, nspheres and convex
> polygons/rings and in the future Geometries currently not available
> like oriented boxes, ellipsoids, capsules, cylinders and other
> frequently used in e.g. physics engines.

Agreed this name is beter and more generic. My objection was mainly that
envelope should not return circles, and because it is defined as such by

So yes, bounds sounds good to me as a generic term for bounding_box,
And yes, then envelope is just a special case of bounds.
Bounds is plural, maybe just boundary is enough?

Regards, Barend

Geometry list run by mateusz at