Subject: [ggl] namespace model::
From: barend (barend.gehrels)
Date: 2010-12-01 12:40:13
I must admit that I have to get used to it (I mean, to the new namespaces)
So last time I wrote about model::
It is now: model::point, model::linestring, etc.
This new namespace model seems very good to me.
Now I write about the second phase of this models.
point_2d goes to model::d2::point
polygon_2d goes to model::d2::point
point_3d goes to model::d3::point
polygon_3d goes to model::d3::polygon
point_xy goes to model::xy::point
(I believe this is not mentioned on the list earlier)
Note that it does not go to cartesian::point, because there is also
(expected) to be a xyz::point. And the coordinate system defaults to
cartesian, but might be specified otherwise.
xy::poitn sounds already a bit strange, but with the next one I become quite
unsure about these changes.
point_ll_deg goes to model::ll::degree::point (?) (or model::latlon::degree,
or model::lola::degree, or...)
I've the feeling that we are going to mix Dimension, Coordinate System,
Units and namespaces now.
The reason for existance of point_2d is just a shortcut. It is a shortcut
for point<double, 2, cs::cartesian>
The reason for existance of point_xy is that it provides the additional
methods x(), y(), and a constructor taking two values. I don't use them. The
library does not use them (besides in examples and some tests). But some
library users might appreciate it. But actually I find the xy::point
namespace a bit funny. There are no (or not yet) other geometries with _xy,
like linestring_xy / xy::linestring or polygon_xy / xy::polygon (though for
consistent with d2:: they might be created).
The expected point_xyz does not exist (yet), has never existed. So didn't
(yet) create an xyz::point
The reason for existance of point_ll_deg is that it provides the additional
methods lat(), lon(), and a constructor taking a special provision that lat
and lon might be specified in any order. The library does not use them. It
is designed some years ago, and because lat/lon is always confusing (y/x),
it made some sense. However, I'm not sure about things like
model::ll::degree. By the way, this latlong point is all in an extension.
Same for rad (radian).
So I'm unsure, but I also realize that a namespace like d2:: is actually
much better than a suffix like _2d, which acts just as a namespace.
I made changes but didn't commit, and if any of this list things this is
going into the wrong direction, please discuss.
We can also skip this change, or move these additional,
for-library-non-essential points, to the original namespace (so without
model), or another namespace, because all these are more or less just
-------------- next part --------------
An HTML attachment was scrubbed...
Geometry list run by mateusz at loskot.net