0

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).

Geofenced route from point A to point B

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?

  • 1
    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
  • We got this done. Pls check here bit.ly/2z73SHn Basically we used jsts library and google directional api – tk120404 Aug 17 at 19:02

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).

Would you like to answer one of these unanswered questions instead?

Browse other questions tagged or ask your own question.