Skip to content

ST_AsGeoJSON

Returns the GeoJSON representation of a geometry.

Usage

string ST_AsGeoJSON(geom: geometry)

Arguments

  • geom (geometry): Input geometry

Examples

SELECT ST_AsGeoJSON(ST_Point(1.0, 2.0));
┌───────────────────────────────────────────────┐
 st_asgeojson(st_point(Float64(1),Float64(2))) 
                      utf8                     
╞═══════════════════════════════════════════════╡
 {"type":"Point","coordinates":[1.0,2.0]}      
└───────────────────────────────────────────────┘