From: Noah Stein (noah_at_[hidden])
Date: 2008-03-26 02:16:55
Max Motovilov wrote:
> > I am extremely interested in a boost affine geometry library, but given
> > the history on this mailing list I suspect the best approach might be to
> > start with less rather than more.
> Absolutely agree; some of my suggestions are definitely well out there.
> The reason I am airing them up here is (a) to get thoughts on the
> subject from interested people which might help me implement some of it
> and (b) see if I might be able to work the prospective implementations
> into an open-source library that may perhaps be accepted into Boost.
> I've grown rather tired of re-writing the same libraries (granted, with
> improvements) over and over for each new project :)
I've written vector, point, and matrix classes many, many times. I'm in the
middle of writing another one at the moment to try out proto. I think a
great geometry library would be an enormous asset. Having said that, I've
been around for a couple of the discussions here about such a library.
There's not a lot of consensus. My apologies, but to illustrate, I'll show
my lack of consensus:
* I like that the default point constructor does nothing as I hate the
potential inefficiency if I don't have my initial data ready at construction
time. I'm not a big fan of the init_option constructor. Isn't the
init_option almost always going to be defined at compile-time, thus the
switch-case is wasteful.
* Why don't you have a vector class? It would conceptually be used in
situations such computing the area of a polygon. Instead, I see that you've
written out the subtraction by hand.
* I'm not a fan of a point_xy class. Scaling up to 3D, you now need a
separate point_xyz class. There's going to be a lot similar code that need
only be written once if the class was templated on dimension as well as the
internal element type. In addition, the X() and Y() accessor functions
aren't as readable, to me, as operator, e.g. v3.Y(v1.Y()+v2.Y()) vs.
v3[Y]=v1[Y]+v2[Y], assuming Y is something along the lines of const int Y =
I'm not a GIS developer. What you have might be very standard in the world
of GIS. It's a bit different to the things I see every day. There are
probably a few other ways of doing it too. I'd be rather happy if the
community could find consensus, and I'm willing to discuss it.
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.22.0/1342 - Release Date: 3/25/2008
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk