Subject: Re: [boost] [geometry] area, length, centroid, behavior
From: John Femiani (john.femiani_at_[hidden])
Date: 2009-03-03 12:27:51
On Tue, Feb 24, 2009 at 5:29 AM, Barend Gehrels <barend_at_[hidden]> wrote:
> What should the generic "area" algorithm return for point and
> What should the generic "length" algorithm return for polygon?...
> What should the generic "centroid" algorithm return for point and
> and for an invalid polygon (e.g. no points at all, or not closed)?...
> Thanks, Barend
Are these generic "algorithms" or part of the concepts themselves?
I think a number of options make sense for any particular library but not
for the concepts -- I think area(p) should not be part of the point concept,
and should not be available for a point archetype, but it may exist anyways
in your particular library. Concepts don't usually "disallow" functions do
they? (or do they?)
As far as invalid polygons --- I am curious how one would go about creating
a polygon that is not closed. I would tend to think that since you have a
linestring, then a polygon must mean that the shape is closed.
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk