[GIS] Buffer Zone Algorithm

algorithmbuffergoogle mapsPHP

I use google maps, php, mysql, and I want to create a buffer zone in line among some points.

Could someone tell me where can i find the algorithm (php library or the math in order to implement it) to achieve this?

In the forum I read a lot of similar questions based on postgis and the ST_BUFFER function, i want to implement this function in php or javascript with points of google maps.

Best Answer

You shouldn't need to re-implement the wheel, there are lots of geospatial libraries out there. As you've noticed, PostGIS includes a buffer function, unfortunately MySQL has sub-standard spatial support and therefore doesn't include one. If possible you may wish to consider switching to PostGIS if spatial functionality is important to you.

There are several PHP Geospatial libraries list here for various things: http://phptrends.com/dig_in/geospatial

A search for "Javascript geospatial library" also brings up a few results. One of them is something called jQuery Geo: http://www.jquerygeo.com/