FromGeoJSON

Description

Convertit une chaîne au format GeoJSON (format d'échange des données géospatiales basé sur JavaScript Object Notation (JSON)) en une géométrie Spatial Feature, telle que Point, MultiPoint, LineString, MultiLineString, Polygon, Polygon, MultiPolygon ou Geometry Collection. Cette fonction ne gère que le fragment de géométrie GeoJSON et considère qu'il présente la syntaxe GeoJSON 1.0. La spécification GeoJSON suit la notation JSON définie, disponible à l'adresse suivante : http://geojson.org/geojson-spec.html.

Remarque : Cette fonction n'est prise en charge que pour les système de coordonnées pris en charge par MapInfo.

Voici un exemple de chaîne GeoJSON :

{"type":"Point","coordinates":[100.0,200.0],"crs":{"type":"name","properties":{"name":"epsg:4326"}}}

Syntaxe

FromGeoJSON (str)

Arguments

str est une chaîne GeoJSON.

Exemple

Renvoie une géométrie Spatial Feature à partir d'une chaîne au format GeoJSON.

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