ST_AsGeoJSON
Signature
Parameters
GeoJSON type to return: “Simple” (default) for a bare geometry, “Feature” to wrap it in a Feature, or “FeatureCollection” to wrap that Feature in a FeatureCollection.
Generate the GeoJSON style representation of a geometry column.
ST_AsGeoJSON