GeoJSON
ナビゲーションに移動
検索に移動
この項目「GeoJSON」は途中まで翻訳されたものです。(原文:en:GeoJSON) 翻訳作業に協力して下さる方を求めています。ノートページや履歴、翻訳のガイドラインも参照してください。要約欄への翻訳情報の記入をお忘れなく。(2013年11月) |
拡張子 | .json , .geojson |
---|---|
MIMEタイプ | application/geo+json |
種別 | GISファイル形式 |
派生元 | JSON |
オープン フォーマット | yes |
ウェブサイト | geojson |
GeoJSON[1]はJavaScript Object Notation (JSON) を用いて空間データをエンコードし非空間属性を関連付けるファイルフォーマットである。 属性にはポイント(住所や座標)、ライン(各種道路や境界線)、 ポリゴン(国や地域)などが含まれる。 他のGISファイル形式との違いとして、Open Geospatial Consortiumではなく世界各地の開発者達が開発し管理している点で異なる[2]。 TopojsonはGeoJSONに影響され開発された。
歴史[編集]
GeoJSONフォーマットについての議論は2007年3月に始まり[3]、フォーマット仕様は2008年6月に完成した。
例[編集]
{ "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 | ![]() |
{ "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[4]、Leaflet[5]、GeoServer[6]、Django[7] 、GDAL[8]、CartoDB[9]、PostGIS[10]及びMapnik[11](GDAL OGR変換ライブラリを経由し扱う)など多くのGIS関連ソフトウェアが対応しており、 Bing MapsやYahoo!、GoogleはAPIが対応している。 Googleマップにはライブラリを使用するか[12]、オブジェクトをインスタンス化することによって利用できる。 GitHubはGeoJSONのレンダリングに対応している[13]。
TopoJSON[編集]
TopoJSONはGeoJSONの拡張であり、トポロジーを記述する。
脚注[編集]
- ^ The GeoJSON Format Specification
- ^ The GeoJSON Discussion List
- ^ March 2007 Archives by thread
- ^ http://openlayers.org/dev/examples/vector-formats.html
- ^ http://leafletjs.com/reference.html#geojson
- ^ http://svn.codehaus.org/geoserver/tags/2.0.0-alpha1/geoserver/release/README.txt
- ^ http://geodjango.org/docs/db-api.html
- ^ http://gdal.org/ogr/drv_geojson.html
- ^ http://developers.cartodb.com/documentation/cartodb-js.html
- ^ http://pugs.postgresql.org/files/Introduction_to_PostGIS_v1.0.pdf
- ^ http://svn.mapnik.org/tags/release-0.6.0/docs/api_docs/python/mapnik-module.html
- ^ https://github.com/JasonSanford/GeoJSON-to-Google-Maps
- ^ https://github.com/blog/1528-there-s-a-map-for-that