Converts a string formatted in GeoJSON (geospatial data interchange format based on JavaScript Object Notation (JSON)) to a Spatial Feature geometry, such as a Point, MultiPoint, LineString, MultiLineString, Polygon, Polygon, MultiPolygon or Geometry Collection. This function deals with the GeoJSON geometry fragment only and assumes it is in the GeoJSON 1.0 syntax. The GeoJSON specification follows the defined JSON from

Note: This function is supported only for coordinate system supported by MapInfo.

An example of a GeoJSON string is:



FromGeoJSON (str)


str is a GeoJSON string


Returns a Spatial Feature geometry from a GeoJSON-formatted string.

select FromGeoJSON('{"type": "Point", "coordinates": [-71,43.824787,50], "crs": {"type": "name", "properties": {"name": "epsg:4326"}}}') as mi_point from countries where country='Canada'