I have some polygons saved in postgres using postgis and now I need some way to convert this data to a GeoJSON file so I can display it over google maps.
Here is an example of a polygon in postgis
"POLYGON ((-40 145, -40 145, -40 145, -40 145, -40 145, -40 145))"
How could I convert this to the equivalent polygon in GeoJSON?