query about multi_linestring in boost::geometry
Hello,
I am planning to make use of multi_linestring in my application. Before that I have some queries, for which I'm running short of answers. Here are
few questions
1. Is it possible to redistribute the number of points in a particular linestring of a multi_linestring variable?
2. Is it possible to split one linestring into two linestrings and store them in the same multi_linestring variable?
3. In regards to point 2, is it possible to merge two different linestrings within a multi_linestring variable and make a single linestring instead of two?
If possible, can any one provide any reference to some links, or some examples?
Thanks
Re: query about multi_linestring in boost::geometry
Quote:
Originally Posted by
rakeshthp
Is it possible[...]
yes it is. Note that boost geometry algorithms operate on concept models rather then specific containers. Hence, you can freely use any data structure that best fits your requirements. For example, you can use an std::vector<std::vector<point>> to quickly implement 1-3. Alternatively, to make the merge/split in 2-3 faster, yu could model the multi linestring as a vector of pairs of indeces referring to ranges in a linear point cache. You can find examples in the boost reference.