[geometry] Buffer multi-linestring with different distances
Is it possible to buffer a multi-linestring where each linestring has his own distance to buffer? Something like this: http://docs.qgis.org/2.2/en/_images/variable_buffer.png Thank you in advance -- *Renato Silveira* Ph. D. Student Informatics Institute - UFRGS Porto Alegre - RS - Brazil http://www.inf.ufrgs.br/~rsilveira
Off hand, I would imagine the answer is no, but I also imagine it should be
relatively easy to buffer each linestring independently and then union the
results.
On 26 March 2015 at 14:01, Renato Silveira
Is it possible to buffer a multi-linestring where each linestring has his own distance to buffer?
Something like this: http://docs.qgis.org/2.2/en/_images/variable_buffer.png
Thank you in advance
--
*Renato Silveira* Ph. D. Student Informatics Institute - UFRGS Porto Alegre - RS - Brazil http://www.inf.ufrgs.br/~rsilveira
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hi Renato, Renato Silveira schreef op 26-3-2015 om 4:01:
Is it possible to buffer a multi-linestring where each linestring has his own distance to buffer?
Something like this: http://docs.qgis.org/2.2/en/_images/variable_buffer.png
Thank you in advance
Yes this is, somehow, possible, with some reservations. The design of the library allows doing these kind of things. But for this specific problem it is not yet convenient, and requires point comparisons. In case of linestrings, if they intersect (like in your example), that might cause some problems. You can create your own distance-strategy. In that strategy, in the apply method, you should check the two input points. Depending on which input linestring the points are part of, you could specify another distance. See for example the file buffer_distance_symmetric.hpp , which contains the default symmetric distance strategy. Using that as a starting point, you might experiment. I did not test this myself. Please report if it works or if there are problems. This will be enhanced in a future release. Regards, Barend
Thank you! I will test this and post a feedback.
Em quinta-feira, 26 de março de 2015, Barend Gehrels
Hi Renato,
Renato Silveira schreef op 26-3-2015 om 4:01:
Is it possible to buffer a multi-linestring where each linestring has his own distance to buffer?
Something like this: http://docs.qgis.org/2.2/en/_images/variable_buffer.png
Thank you in advance
Yes this is, somehow, possible, with some reservations.
The design of the library allows doing these kind of things. But for this specific problem it is not yet convenient, and requires point comparisons. In case of linestrings, if they intersect (like in your example), that might cause some problems.
You can create your own distance-strategy. In that strategy, in the apply method, you should check the two input points. Depending on which input linestring the points are part of, you could specify another distance. See for example the file buffer_distance_symmetric.hpp , which contains the default symmetric distance strategy. Using that as a starting point, you might experiment.
I did not test this myself. Please report if it works or if there are problems.
This will be enhanced in a future release.
Regards, Barend
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- *Renato Silveira* Ph. D. in Computer Science Informatics Institute - UFRGS Porto Alegre - RS - Brazil http://www.inf.ufrgs.br/~rsilveira
participants (3)
-
Barend Gehrels
-
Jeremy Murphy
-
Renato Silveira