|
Geometry : |
Subject: [ggl] Polygon concept change and Boost.Polygon
From: barend (barend.gehrels)
Date: 2010-12-12 08:48:59
hi list,
With respect to geometries, the namespace renaming I've doing (-> model::),
and this point from the review results:
Concepts: more refinement needs to be done for the existing concepts. At
least 2 users claimed to not have been able to adapt their data structures
to the existing scheme.
... I have adapted several Boost.Polygon geometries to Boost.Geometry.
This needed thusfar one change in our concept, because we returned rings
(parts of polygons) by reference, which is not possible for any geometry not
containing ranges. So it is now agnostic with respect to return type, so
by-value and by-reference are both permitted.
More information in my recent blog about this:
http://barendgehrels.blogspot.com/2010/12/range-return-types-and-references.html
Many thanks to Bruno for the off-list chats last few days about this.
Note that the concepts need to be worked-at a little further for
modification of adapted geometries. But I'm glad with the current results
that Boost.Polygon polygons can be used for Boost.Geometry's algorithms
accepting const geometries.
For your convenience:
http://bit.ly/hjuZZw with adaption sources
http://bit.ly/gOf0P4 with test project
I currently did the adaption in the boost::geometry::adapt::bp namespace. It
is possible to do things in the boost::polygon namespace (with as side
effect that Boost.Polygon's polygons can be used as ranges). But I leave
that to Luke if he wants that.
Regards, Barend
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ggl/attachments/20101212/ea07ef31/attachment.html
Geometry list run by mateusz at loskot.net