Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Algorithm - How to build a polygon around a polyline

I am building a web site using googles Map API. However, as I am on a shared server, I do not have access to a database with spatial extensions.

Given an itinerary, which is nothing more than a series of line segments, I need to build a polygon at a given distance. For example 10km either side of the itinerary.

This is the classic buffering request, which I have seen as being referenced as the " Minkowski sum " algorithm. After having searched, I have not found a working example of an implementation.

Can anyone help me implement this ... please ?

like image 523
Simon Avatar asked May 02 '26 21:05

Simon


1 Answers

You should take a look at CGAL. This library contains (among a lot of other things) an Open Source Minkowski sum implementation, which you could analyse. See here

like image 141
Eilistraee Avatar answered May 05 '26 20:05

Eilistraee