$include_dir="/home/hyper-archives/geometry/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [geometry] one more variation to "transform"/"convert"/"for_each_point"
From: Barend Gehrels (barend_at_[hidden])
Date: 2012-02-15 13:40:45
Hi Volker,
On 15-2-2012 17:36, Volker Schöch wrote:
>
> Hi,
>
> I am aware of the transform, convert, and for_each_point algorithms. 
> However, as far as I can see, none of these can be used to achieve the 
> following: I want to copy one (multi-)polygon to another while 
> applying a transform operator to its points. In particular, the result 
> point type of the transformation is different from the input point 
> type. See this code for an illustration:
>
> http://codepad.org/uzp99Zos
>
> That's how I currently solve this, but a generic function along the 
> lines of boost::adaptors::transform would seem the natural way to do 
> it, offering the user a way to apply a point-wise operator while 
> hiding the internal data structures of the specific geometry. Such a 
> transform operation could also be generically applied, allowing to 
> supply the specific geometry type as a template parameter.
>
> Do you have something like that available, and I just missed it? If 
> not, may I suggest that as a future extension to the GGL?
>
OK, I see. Not it is not available and it is a good suggestion.
Thanks, Barend