jq コマンドサンプル: 鉄道名の一覧を取得
やりたいこと
- 鉄道路線の geojson ファイルから 鉄道名の一覧を取得したい
前提
国交省から鉄道路線データ ( N02-24_RailroadSection ) を
https://nlftp.mlit.go.jp/ksj/gml/datalist/KsjTmplt-N02-2024.html
データの内容
json
{
"type": "FeatureCollection",
"name": "N02-24_RailroadSection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:EPSG::6668" } },
"features": [
{ "type": "Feature", "properties": { "N02_001": "23", "N02_002": "5", "N02_003": "沖縄都市モノレール線", "N02_004": "沖縄都市モノレール" }, "geometry": { ... } },
{ "type": "Feature", "properties": { "N02_001": "12", "N02_002": "5", "N02_003": "いわて銀河鉄道線", "N02_004": "アイジーアールいわて銀河鉄道" }, "geometry": { ... } },
...