# Geofencing routes from point A to point B using Google Maps?

I'm working on a task where given the coordinates of a line from point A to point B, I need to create a geofence around this line (road route).

But based on what I read here https://developers.google.com/maps/documentation/tracks/limits, geofence has a limit of 100 vertices per polygon.

Is my understanding correct, that its not possible for me to create the polygon for geofence given all the vertices that will be generated to enclose the route above will be more than 100?

• Welcome to GIS.SE. The Pacific Highway is almost a pathological case for line complexity, but you can probably simplify it considerably without changing the buffer in any meaningful way. Get the track, import it into a tool like QGIS, simplify until you reach the require number of polygons, and import that into Track. – BradHards Mar 7 '14 at 1:05
• Thank you @BradHards. The process that was required for me was to come up with a function that will accept the line coordinates, and then generate a parallel line that will enclose the road. For the route above, that's 5000+ points already... so I will probably end up with more than 5k+ points for the polygon enclosing the route... Given this process... is it safe to assume that it will be really difficult to create the function that will limit the vertices to at least 100? And is my understanding correct about the Google Track APi and its vertex limit? Thank you. – martianaus Mar 7 '14 at 1:18
• can you give me the algorithm to generate geofence for the route? – Janandojan Jul 29 '14 at 13:36
• This isn't an answer, please post your question as a comment to the original, or post as a separate question. – GISKid Jul 29 '14 at 13:46

## protected by Community♦Mar 27 '17 at 9:34

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).