For faster navigation, this Iframe is preloading the Wikiwand page for GeoJSON.

GeoJSON

この項目「GeoJSON」は途中まで翻訳されたものです。(原文:en:GeoJSON)翻訳作業に協力して下さる方を求めています。ノートページ履歴翻訳のガイドラインも参照してください。要約欄への翻訳情報の記入をお忘れなく。(2013年11月)
GeoJSON
拡張子.json, .geojson
MIMEタイプapplication/geo+json[1]
種別GISファイル形式英語版
派生元JSON
国際標準RFC 7946
オープン
フォーマット
yes
ウェブサイトgeojson.org

GeoJSON[1]JavaScript Object Notation(JSON)を用いて空間データをエンコードし非空間属性を関連付けるファイルフォーマットである。属性にはポイント(住所や座標)、ライン(各種道路や境界線)、 ポリゴン(国や地域)などが含まれる。他のGISファイル形式との違いとして、Open Geospatial Consortiumではなく世界各地の開発者達が開発し管理している点で異なる[2]。TopoJSONはGeoJSONに影響され開発された。

歴史

[編集]

GeoJSONフォーマットについての議論は2007年3月に始まり[3]、フォーマット仕様は2008年6月に完成した。

2015年4月、Internet Engineering Task ForceがGeographic JSON working groupを設立した[4]。2016年8月、GeoJSONはRFC 7946としてリリースされた。

[編集]
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [102.0, 0.5]
      },
      "properties": {
        "prop0": "value0"
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]
        ]
      },
      "properties": {
        "prop0": "value0",
        "prop1": 0.0
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [100.0, 0.0], [101.0, 0.0], [101.0, 1.0],
            [100.0, 1.0], [100.0, 0.0]
          ]
        ]
      },
      "properties": {
        "prop0": "value0",
        "prop1": { "this": "that" }
      }
    }
  ]
}

ジオメトリ

[編集]

点(Point)は[x, y]または[x, y, z]である。[longitude, latitude ] または[eastings, northings]のいずれとしても解釈される可能性がある。3番目の数値はオプションの標高である。10進数で表現する[5]

たとえば、ロンドン(51.5074° North, 0.1278° West)は、[-0.1278, 51.5074]と表現される。

ジオメトリのプリミティブ
タイプ
Point
{ "type": "Point", 
    "coordinates": [30, 10]
}
LineString
{ "type": "LineString", 
    "coordinates": [
        [30, 10], [10, 30], [40, 40]
    ]
}
Polygon
{ "type": "Polygon", 
    "coordinates": [
        [[30, 10], [40, 40], [20, 40], [10, 20], [30, 10]]
    ]
}
{ "type": "Polygon", 
    "coordinates": [
        [[35, 10], [45, 45], [15, 40], [10, 20], [35, 10]], 
        [[20, 30], [35, 35], [30, 20], [20, 30]]
    ]
}
複数の部分から成るジオメトリ
Type
MultiPoint
{ "type": "MultiPoint", 
    "coordinates": [
        [10, 40], [40, 30], [20, 20], [30, 10]
    ]
}
MultiLineString
{ "type": "MultiLineString", 
    "coordinates": [
        [[10, 10], [20, 20], [10, 40]], 
        [[40, 40], [30, 30], [40, 20], [30, 10]]
    ]
}
MultiPolygon
{ "type": "MultiPolygon", 
    "coordinates": [
        [
            [[30, 20], [45, 40], [10, 40], [30, 20]]
        ], 
        [
            [[15, 5], [40, 10], [10, 20], [5, 10], [15, 5]]
        ]
    ]
}
{ "type": "MultiPolygon", 
    "coordinates": [
        [
            [[40, 40], [20, 45], [45, 30], [40, 40]]
        ], 
        [
            [[20, 35], [10, 30], [10, 10], [30, 5], [45, 20], [20, 35]], 
            [[30, 20], [20, 15], [20, 25], [30, 20]]
        ]
    ]
}

対応状況

[編集]

OpenLayers[6]Leaflet[7]GeoServer[8]Django[9]GDAL[10]CartoDB[11]PostGIS[12]及びMapnik[13](GDAL OGR変換ライブラリを経由し扱う)など多くのGIS関連ソフトウェアが対応しており、 Bing MapsYahoo!GoogleAPIが対応している。 Googleマップにはライブラリを使用するか[14]、オブジェクトをインスタンス化することによって利用できる。 GitHubはGeoJSONのレンダリングに対応している[15]

TopoJSON

[編集]

TopoJSONはGeoJSONの拡張であり、トポロジーを記述する。

TopoJSONのshape

以下にTopoJSONの例を示す。

{
  "type":"Topology",
  "transform":{
    "scale": [1,1],
    "translate": [0,0]
  },
  "objects":{ 
    "two-squares":{
      "type": "GeometryCollection",
      "geometries":[
        {"type": "Polygon", "arcs":[[0,1]],"properties": {"name": "Left_Polygon" )),
        {"type": "Polygon", "arcs":[[2,-1]],"properties": {"name": "Right_Polygon" ))
      ]
    },
    "one-line": {
      "type":"GeometryCollection",
      "geometries":[
        {"type": "LineString", "arcs": [3],"properties":{"name":"Under_LineString"))
      ]
    },
    "two-places":{
      "type":"GeometryCollection",
      "geometries":[
        {"type":"Point","coordinates":[0,0],"properties":{"name":"Origine_Point")),
        {"type":"Point","coordinates":[0,-1],"properties":{"name":"Under_Point"))
      ]
    }
  },
  "arcs": [
    [[1,2],[0,-2]],
    [[1,0],[-1,0],[0,2],[1,0]],
    [[1,2],[1,0],[0,-2],[-1,0]],
    [[0,-1],[2,0]]
  ]
}

派生

[編集]

転送効率向上、ストリーミング型処理等を目指し、各種の派生フォーマットがある。

  • Newline-delimited GeoJSON
  • FlatGeobuf
  • GeoArrow
  • GeoParquet

脚注

[編集]

外部リンク

[編集]
{{bottomLinkPreText}} {{bottomLinkText}}
GeoJSON
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?