Regarding fetching the polygon data from google map and save in postgis

I have a requirement where I would need to create a geo fence and for that I have used the google map and the drawing tools and I could create a polygon using the drawing tool but I am not sure on how to save the data in postgis and I saw about rgeo but I was not clear on how to use that. So please guide me through the process and I also would like to know how the polygon data from the google map is received i.e., format of the data. From my understanding I think the postgis can save the WKT format and I don’t think google map is presenting the data as WKT. So, how can I get the data and save it in the postgis and then show the graph again from the table.

Logesh m wrote in post #1152814:

I have a requirement where I would need to create a geo fence and for that I have used the google map and the drawing tools and I could create a polygon using the drawing tool but I am not sure on how to save the data in postgis and I saw about rgeo but I was not clear on how to use that. So please guide me through the process and I also would like to know how the polygon data from the google map is received i.e., format of the data. From my understanding I think the postgis can save the WKT format and I don’t think google map is presenting the data as WKT. So, how can I get the data and save it in the postgis and then show the graph again from the table.

RTFM: