Boost logo

Boost Users :

Subject: Re: [Boost-users] Geometry: modifiable?
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2014-07-23 07:41:51


Hi,

Jeremy Murphy wrote:
>
> Is there a generic way to modify geometry structurally? Say if I have
> a ring and I want to insert a new point? Or would I need to reach into
> the underlying container to make that kind of change?
> Thanks, cheers.
> Jeremy
>

You may use one of the provided functions:
- append()
(http://www.boost.org/doc/libs/1_55_0/libs/geometry/doc/html/geometry/reference/algorithms/append.html)
- assign_points()
(http://www.boost.org/doc/libs/1_55_0/libs/geometry/doc/html/geometry/reference/algorithms/assign/assign_points.html)
- clear()
(http://www.boost.org/doc/libs/1_55_0/libs/geometry/doc/html/geometry/reference/algorithms/clear.html)

And in case you wanted to modify only one ring of a Polygon, there are also:
- exterior_ring()
(http://www.boost.org/doc/libs/1_55_0/libs/geometry/doc/html/geometry/reference/access/exterior_ring/exterior_ring_1.html)
- interior_rings()
(http://www.boost.org/doc/libs/1_55_0/libs/geometry/doc/html/geometry/reference/access/interior_rings/interior_rings_1.html)

Regards,
Adam


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net