Boost logo

Geometry :

Subject: [ggl] Ring type as template parameter for polygon
From: Barend Gehrels (barend)
Date: 2011-11-20 15:38:31


Hi Zvi,

On 20-11-2011 14:42, Tarem, Zvi wrote:
>
> Currently, the polygon template depends on the point type. But the
> only data members of a polygon are rings, not points. So in my
> opinion, the polygon template should depend on the ring type (which
> will, of course, imply a point type).
>
> Currently, every time you create a custom ring type (which is easy
> using the registration macros), you are required to create a
> corresponding custom polygon type (without the convenience of a
> registration macro). This is an unnecessary burden on the user of the
> library.
>

Yes, that could have been done as well. All (non-multi) geometries are
based on the Point parameter, so that makes them consistent.

The boost::geometry::model::polygon is one of the provided geometries,
but you can also use other or create your own. So you can create a
version based on rings.

About the convenience of registration macro's for polygons, we discussed
about that a week ago so I paste here a piece for convenience:

> We were, in general, a little hesitant, we want to avoid creating
> dozens of macros. The more complex the geometry type is, the more
> possibilities there are. For that reason we did not provide them for
> polygons. Users can specialize themselves, so there is never a problem.

Regards, Barend

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ggl/attachments/20111120/45d5b99d/attachment.html


Geometry list run by mateusz at loskot.net