FromGeoJSON
説明
GeoJSON (JavaScript Object Notation (JSON) に基づく地理空間データの相互交換形式) で書式設定された文字列を 空間フィーチャ ジオメトリ (Point、MultiPoint、LineString、MultiLineString、Polygon、Polygon、MultiPolygon、Geometry Collection など) に変換します。この関数は、GeoJSON ジオメトリ フラグメントのみを処理し、このフラグメントが GeoJSON 1.0 構文に従っているものと仮定します。GeoJSON の仕様は、http://geojson.org/geojson-spec.html にある定義済み JSON に従っています。
注: この関数は、MapInfo でサポートされている座標系でのみサポートされています。
GeoJSON 文字列の例を次に示します。
{"type":"Point","coordinates":[100.0,200.0],"crs":{"type":"name","properties":{"name":"epsg:4326"}}}
構文
FromGeoJSON (str)
引数
str は GeoJSON 文字列です。
例
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'