CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2009
    Location
    Bangalore, INDIA
    Posts
    45

    Question 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

  2. #2
    Join Date
    Oct 2008
    Posts
    1,456

    Re: query about multi_linestring in boost::geometry

    Quote Originally Posted by rakeshthp View Post
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured