GIS奮闘記

元GISエンジニアの技術紹介ブログ。主にPythonを使用。

スポンサーリンク

Elasticsearch と Python を使って空間検索をしてみる

皆様、お久しぶりです。前回のエントリーから間が空いてしまいましたが、また少しずつブログの更新をしていきたいと思っています。今回は Elasticsearch と Python を使って空間検索をしてみようと思います。

以前にも Elasticsearch に関して以下のエントリーを書いているのでぜひ読んでみてください。

www.gis-py.com

なお、Elasticsearch のインストールや設定などについては本エントリーでは割愛しています。

実行環境

macOS 11.3.1
Python 3.9.6
Elasticsearch 7.17.0
elasticsearch 8.0.0(Elasticsearch の Python クライアント)

手順

  1. インデックスの作成
  2. 位置情報データを Elasticsearch に格納
  3. 空間検索

1.インデックスの作成

Elasticsearch 上にインデックスを作成します。詳細については以下をご参照ください。

www.elastic.co

PUT culture_sports_park
{
  "mappings": {
    "properties": {
      "location": {
        "type": "geo_point"
      }
    }
  }
}

2.位置情報データを Elasticsearch に格納

今回は「東京都オープンデータカタログサイト」から文化・スポーツ施設・公園の geojsonデータをダウンロードしてみたいと思います。

catalog.data.metro.tokyo.lg.jp

Elasticsearch の Python クライアント である elasticsearch を使って以下のようにデータを格納します。

import geojson
from elasticsearch import Elasticsearch, helpers

with open("culture_sports_park.geojson") as f:
    gj = geojson.load(f)

    es = Elasticsearch("http://localhost:9200")

    k = ({
        "_index": "culture_sports_park",
        "_source": {
            "name": feature["properties"]["施設名称"],
            "address": feature["properties"]["所在地"],
            "note": feature["properties"]["備考"],
            "location": {
                "lat":feature["geometry"]["coordinates"][1],
                "lon": feature["geometry"]["coordinates"][0]
            }
        }

    } for feature in gj['features'])

    helpers.bulk(es, k)

以下のコマンドでデータが格納されているか確認します。

GET culture_sports_park/_search

ばっちりですね。

f:id:sanvarie:20220314075335p:plain

これを Kibana 上で可視化してみると以下のようになります。

f:id:sanvarie:20220314075904p:plain

3.空間検索

蒲田駅から半径5kmにある文化・スポーツ施設・公園を検索してみます。

from elasticsearch import Elasticsearch

es = Elasticsearch("http://localhost:9200")

# 蒲田駅から半径5kmにあるポイントを検索
query = {
  "query": {
    "geo_distance": {
      "distance": "5km",
      "location": {
        "lat": 35.562479,
        "lon": 139.716073
      }
    }
  }
}

# 検索
result = es.search(index="culture_sports_park", body=query, size=100)

# 結果表示
for document in result["hits"]["hits"]:
    print(document["_source"])

このような結果となりました。

{'name': '旗の台文化センター', 'address': '東京都品川区旗の台5-19-5', 'note': '所在地:旗の台5-19-5電話:3786-5191 施設内容:第1〜2会議室 レクリエーションホール スポーツ室 グループ室 休館日:年末年始・毎月第4日曜日', 'location': {'lat': 35.603845, 'lon': 139.700253}}
{'name': '南大井文化センター', 'address': '東京都品川区南大井1-12-6', 'note': '所在地:南大井1-12-6 電話:3764-6511 施設内容:第1〜3講習室\u3000美術工芸室\u3000レクリエーションホール\u3000スポーツ室\u3000託児室\u3000グループ室 休館日:年末年始・毎月第4日曜日', 'location': {'lat': 35.596235, 'lon': 139.737582}}
{'name': '南大井図書館', 'address': '東京都品川区南大井3-7-13保育園等と併設', 'note': '品川区南大井3-7-13併設南大井児童センター南大井保育園南大井シルバーセンター', 'location': {'lat': 35.591586, 'lon': 139.734398}}
{'name': '源氏前図書館', 'address': '東京都品川区中延4-14-17保育園と併設', 'note': '品川区中延4-14-17併設源氏前保育園', 'location': {'lat': 35.605478, 'lon': 139.709904}}
{'name': '大井図書館', 'address': '東京都品川区大井5-19-14滝王子児童センターと併設', 'note': '品川区大井5-19-14併設滝王子児童センター', 'location': {'lat': 35.598196, 'lon': 139.729134}}
{'name': '品川歴史館', 'address': '東京都品川区大井6-11-1', 'note': '品川区大井6-11-1電話:3777-4060 交通:大井町駅から東急バス「鹿島神社前」下車徒歩1分、JR大森駅山王北口下車徒歩10分 開館時間:午前9時〜午後5時(入館は4時30分まで) 休館日:年末年始、月曜日および祝日', 'location': {'lat': 35.596791, 'lon': 139.730102}}
{'name': 'メイプルセンター', 'address': '東京都品川区西大井1-4-25', 'note': '(公財)品川文化振興事業団が運営するカルチャーセンター。 多様な講座を開催。所在地:西大井1-4-25電話:3774-5050 交通:JR横須賀線西大井駅 休館日:毎月第4日曜日、年末年始 開館時間:午前9時〜午後9時30分(土・日・祝日は午後5時まで)', 'location': {'lat': 35.602061, 'lon': 139.722429}}
{'name': 'しながわ水族館', 'address': '東京都品川区勝島3-2-1しながわ区民公園内', 'note': '品川区勝島3-2-1しながわ区民公園内電話:3762-3431 交通: JR大井町駅から無料バス開館時間: 午前10時〜午後5時(入館は午後4時30分まで) 休館日: 毎週火曜日、1月1日 *春休み、ゴールデンウィーク、夏休みは営業', 'location': {'lat': 35.588634, 'lon': 139.737364}}
{'name': '大井ふ頭中央海浜公園野球場', 'address': '東京都品川区八潮4-1-19', 'note': '品川区八潮4-1-19', 'location': {'lat': 35.590939, 'lon': 139.752439}}
{'name': 'しながわ区民公園野球場', 'address': '東京都品川区勝島3-2-2', 'note': '品川区勝島3-2-2 京浜急行\u3000立会川駅、大森海岸駅から徒歩約5分公園内には、しながわ水族館、野球場、庭球場、ディキャンプ場、プール(夏季)あり。', 'location': {'lat': 35.594479, 'lon': 139.740205}}
{'name': 'しながわ区民公園庭球場', 'address': '東京都品川区勝島3-2-2', 'note': '品川区勝島3-2-2 野球場、庭球場ディキャンプ場あり', 'location': {'lat': 35.593656, 'lon': 139.739353}}
{'name': '大井ふ頭中央海浜公園', 'address': '東京都品川区八潮4-1-19', 'note': '品川区八潮4-1-19', 'location': {'lat': 35.592503, 'lon': 139.752289}}
{'name': '大井ふ頭中央海浜公園陸上競技場・球技場', 'address': '東京都品川区八潮4-1-19', 'note': '品川区八潮4-1-19', 'location': {'lat': 35.594031, 'lon': 139.753818}}
{'name': 'しながわ区民公園デイキャンプ場', 'address': '東京都品川区勝島3-2-2', 'note': '品川区勝島3-2-2 野球場、テニス場ディキャンプ場あり', 'location': {'lat': 35.592863, 'lon': 139.738629}}
{'name': '大井海岸公園', 'address': '東京都品川区南大井3-27-5', 'note': '品川区南大井3-27-5', 'location': {'lat': 35.588463, 'lon': 139.733647}}
{'name': '大井水神公園', 'address': '東京都品川区南大井5-16-1', 'note': '品川区南大井5-16-1、南大井6-14-2、南大井6-15-2', 'location': {'lat': 35.595355, 'lon': 139.732493}}
{'name': '鈴ケ森公園', 'address': '東京都品川区南大井4-18-14', 'note': '品川区南大井4-18-14', 'location': {'lat': 35.59351, 'lon': 139.734935}}
{'name': '大井中央公園', 'address': '東京都品川区大井1-46-8', 'note': '品川区大井1-46-8', 'location': {'lat': 35.604517, 'lon': 139.732352}}
{'name': '大井坂下公園', 'address': '東京都品川区南大井6-23-11', 'note': '品川区南大井6-23-11', 'location': {'lat': 35.589516, 'lon': 139.730786}}
{'name': '金子山公園', 'address': '東京都品川区西大井4-11-6', 'note': '品川区西大井4-11-6', 'location': {'lat': 35.59583, 'lon': 139.720733}}
{'name': '新浜川公園', 'address': '東京都品川区東大井2-26-18', 'note': '品川区東大井2-26-18', 'location': {'lat': 35.597859, 'lon': 139.740928}}
{'name': 'わかくさ公園', 'address': '東京都品川区勝島1-6-1', 'note': '品川区勝島1-6-1', 'location': {'lat': 35.598043, 'lon': 139.743905}}
{'name': '原っぱ公園', 'address': '東京都品川区西大井6-1-14', 'note': '品川区西大井6-1-14', 'location': {'lat': 35.601099, 'lon': 139.714796}}
{'name': '宮下公園', 'address': '東京都品川区大井2-7-16', 'note': '品川区大井2-7-16', 'location': {'lat': 35.605213, 'lon': 139.728399}}
{'name': '浜川公園', 'address': '東京都品川区南大井4-8-22', 'note': '品川区南大井4-8-22', 'location': {'lat': 35.597232, 'lon': 139.735757}}
{'name': '滝王子公園', 'address': '東京都品川区大井5-19-5', 'note': '品川区大井5-19-5', 'location': {'lat': 35.598389, 'lon': 139.728806}}
{'name': '出石公園', 'address': '東京都品川区西大井3-16-27', 'note': '品川区西大井3-16-27', 'location': {'lat': 35.594866, 'lon': 139.722095}}
{'name': '浜川北公園', 'address': '東京都品川区東大井3-26-6', 'note': '品川区東大井3-26-6', 'location': {'lat': 35.599143, 'lon': 139.737533}}
{'name': '桐畑公園', 'address': '東京都品川区南大井6-1-17', 'note': '品川区南大井6-1-17', 'location': {'lat': 35.593052, 'lon': 139.73167}}
{'name': '西の森公園', 'address': '東京都品川区西大井4-2-1', 'note': '品川区西大井4-2-1', 'location': {'lat': 35.597725, 'lon': 139.721316}}
{'name': '関ケ原公園', 'address': '東京都品川区東大井6-12-21', 'note': '品川区東大井6-12-21', 'location': {'lat': 35.602174, 'lon': 139.735626}}
{'name': '倉田公園', 'address': '東京都品川区大井4-29-23', 'note': '品川区大井4-29-23', 'location': {'lat': 35.59851, 'lon': 139.73236}}
{'name': '西大井広場公園', 'address': '東京都品川区西大井1-4-10', 'note': '品川区西大井1-4-10、二葉2-19-7', 'location': {'lat': 35.602258, 'lon': 139.723426}}
{'name': '元芝公園', 'address': '東京都品川区東大井3-7-18', 'note': '品川区東大井3-7-18', 'location': {'lat': 35.602744, 'lon': 139.739034}}
{'name': '西大井緑地公園', 'address': '東京都品川区西大井6-10-16', 'note': '品川区西大井6-10-16', 'location': {'lat': 35.600333, 'lon': 139.720565}}
{'name': 'しおじ公園', 'address': '東京都品川区八潮5-8-1', 'note': '品川区八潮5-8-1、八潮5-6-9', 'location': {'lat': 35.596166, 'lon': 139.750656}}
{'name': '大井鹿島公園', 'address': '東京都品川区大井6-8-2', 'note': '品川区大井6-8-2', 'location': {'lat': 35.596954, 'lon': 139.732443}}
{'name': '谷垂公園', 'address': '東京都品川区西大井6-13-10', 'note': '品川区西大井6-13-10', 'location': {'lat': 35.599954, 'lon': 139.717892}}
{'name': 'やまなか公園', 'address': '東京都品川区大井3-22-3', 'note': '品川区大井3-22-3', 'location': {'lat': 35.601039, 'lon': 139.727831}}
{'name': '大森貝塚遺跡庭園', 'address': '東京都品川区大井6-21-6', 'note': '品川区大井6-21-6', 'location': {'lat': 35.593454, 'lon': 139.729945}}
{'name': '旗の台公園', 'address': '東京都品川区旗の台5-19-9', 'note': '品川区旗の台5-19-9', 'location': {'lat': 35.604026, 'lon': 139.700415}}
{'name': '旗の台南公園', 'address': '東京都品川区旗の台5-11-11', 'note': '品川区旗の台5-11-11', 'location': {'lat': 35.603715, 'lon': 139.70271}}
{'name': '東中延公園', 'address': '東京都品川区東中延2-10-2', 'note': '品川区東中延2-10-2', 'location': {'lat': 35.606891, 'lon': 139.712651}}
{'name': '荏原町公園', 'address': '東京都品川区中延5-14-5', 'note': '品川区中延5-14-5', 'location': {'lat': 35.602276, 'lon': 139.708936}}
{'name': '大原公園', 'address': '東京都品川区戸越6-14-1', 'note': '品川区戸越6-14-1', 'location': {'lat': 35.60706, 'lon': 139.71428}}
{'name': '豊町公園', 'address': '東京都品川区豊町6-16-3', 'note': '品川区豊町6-16-3', 'location': {'lat': 35.604645, 'lon': 139.716402}}
{'name': '二葉公園', 'address': '東京都品川区二葉4-13-5', 'note': '品川区二葉4-13-5', 'location': {'lat': 35.603668, 'lon': 139.718124}}
{'name': '旗の台北公園', 'address': '東京都品川区旗の台3-10-15', 'note': '品川区旗の台3-10-15', 'location': {'lat': 35.605695, 'lon': 139.704672}}
{'name': '源氏前公園', 'address': '東京都品川区中延6-4-15', 'note': '中延 6-4-15', 'location': {'lat': 35.602198, 'lon': 139.712407}}
{'name': '旗の台なか公園', 'address': '東京都品川区旗の台3-9-12', 'note': '品川区旗の台3-9-12', 'location': {'lat': 35.604708, 'lon': 139.705797}}
{'name': '戸越南公園', 'address': '東京都品川区戸越6-8-8', 'note': '品川区戸越6-8-8', 'location': {'lat': 35.607305, 'lon': 139.718587}}
{'name': '旗の台広場公園', 'address': '東京都品川区旗の台3-1-5', 'note': '品川区旗の台3-1-5', 'location': {'lat': 35.606235, 'lon': 139.705977}}
{'name': '二鳳公園', 'address': '東京都品川区豊町4-19-20', 'note': '品川区豊町4-19-20', 'location': {'lat': 35.605414, 'lon': 139.721282}}
{'name': '鹿島庚塚児童遊園', 'address': '東京都品川区大井7-29-11', 'note': '品川区大井7-29-11', 'location': {'lat': 35.59392, 'lon': 139.72937}}
{'name': '富士見ケ丘児童遊園', 'address': '東京都品川区西大井5-7', 'note': '品川区西大井5-7-3', 'location': {'lat': 35.599427, 'lon': 139.716358}}
{'name': '北浜川児童遊園', 'address': '東京都品川区東大井2-25-22', 'note': '品川区東大井2-25-22', 'location': {'lat': 35.597968, 'lon': 139.739288}}
{'name': '出石児童遊園', 'address': '東京都品川区西大井3-1-5', 'note': '品川区西大井3-1-5', 'location': {'lat': 35.597804, 'lon': 139.723842}}
{'name': '関ケ原児童遊園', 'address': '東京都品川区南大井5-2-15', 'note': '品川区南大井5-2-15', 'location': {'lat': 35.600409, 'lon': 139.734917}}
{'name': '東大井三丁目児童遊園', 'address': '東京都品川区東大井3-29-6', 'note': '品川区東大井3-29-6', 'location': {'lat': 35.598928, 'lon': 139.737048}}
{'name': '西大井ちびっこ児童遊園', 'address': '東京都品川区西大井2-24-9', 'note': '品川区西大井2-24-9', 'location': {'lat': 35.597834, 'lon': 139.72503}}
{'name': '作守児童遊園', 'address': '東京都品川区大井4-12-14', 'note': '品川区大井4-12-14', 'location': {'lat': 35.601587, 'lon': 139.733211}}
{'name': '桜橋児童遊園', 'address': '東京都品川区東大井3-22-1', 'note': '品川区東大井3-22-1', 'location': {'lat': 35.599858, 'lon': 139.735899}}
{'name': '西大井二丁目児童遊園', 'address': '東京都品川区西大井2-22-7', 'note': '品川区西大井2-22-7', 'location': {'lat': 35.598816, 'lon': 139.724691}}
{'name': '大井倉田児童遊園', 'address': '東京都品川区大井4-22-30', 'note': '品川区大井4-22-30', 'location': {'lat': 35.600254, 'lon': 139.732213}}
{'name': '鈴ケ森道路児童遊園', 'address': '東京都品川区南大井1-22-1', 'note': '品川区南大井1-22-1', 'location': {'lat': 35.594342, 'lon': 139.736671}}
{'name': 'みなみ児童遊園', 'address': '東京都品川区南大井1-13-8', 'note': '品川区南大井1-13-8、南大井1-12-9', 'location': {'lat': 35.595655, 'lon': 139.737085}}
{'name': '旗岡児童遊園', 'address': '東京都品川区旗の台3-6-12', 'note': '品川区旗の台3-6-12', 'location': {'lat': 35.604515, 'lon': 139.708511}}
{'name': '上神明児童遊園', 'address': '東京都品川区二葉4-26-11', 'note': '品川区二葉4-26-11、二葉4-3-15', 'location': {'lat': 35.602209, 'lon': 139.714168}}
{'name': '豊町5丁目児童遊園', 'address': '東京都品川区豊町5-14-3', 'note': '品川区豊町5-14-3', 'location': {'lat': 35.604875, 'lon': 139.720592}}
{'name': '立会川児童遊園(その4)', 'address': '東京都品川区旗の台3-7', 'note': '品川区旗の台3-7地先、旗の台3-7-3-9地先', 'location': {'lat': 35.604264, 'lon': 139.706422}}
{'name': '立会川児童遊園(その2)', 'address': '東京都品川区旗の台2-7', 'note': '品川区旗の台2-7地先、旗の台2-7-2-1地先', 'location': {'lat': 35.606224, 'lon': 139.704371}}
{'name': '立会川児童遊園(その3)', 'address': '東京都品川区旗の台3-11', 'note': '品川区旗の台3-11地先、旗の台3-11-3-10地先', 'location': {'lat': 35.60551, 'lon': 139.704621}}
{'name': '豊町児童遊園', 'address': '東京都品川区豊町4-1-12', 'note': '品川区豊町4-1-12', 'location': {'lat': 35.60722, 'lon': 139.7192}}
{'name': '伊藤児童遊園', 'address': '東京都品川区西大井6-17-9', 'note': '品川区西大井6-17-9', 'location': {'lat': 35.600127, 'lon': 139.715824}}
{'name': '京浜運河緑道公園', 'address': '東京都品川区八潮1', 'note': '品川区八潮1、八潮5', 'location': {'lat': 35.597029, 'lon': 139.748997}}
{'name': 'しながわ区民公園屋外プール', 'address': '東京都品川区勝島3-2-2', 'note': '野球場、庭球場ディキャンプ場あり', 'location': {'lat': 35.593391, 'lon': 139.739778}}
{'name': 'しながわ区民公園', 'address': '東京都品川区勝島3-2-2', 'note': '品川区南大井2-3-17品川区勝島3-2-2', 'location': {'lat': 35.592575, 'lon': 139.738882}}
{'name': '森前公園', 'address': '東京都品川区西大井1-1-10', 'note': '品川区西大井1-1-10', 'location': {'lat': 35.600512, 'lon': 139.721299}}
{'name': '弁天通り公園', 'address': '東京都品川区中延5-3-8', 'note': '品川区中延5-3-8', 'location': {'lat': 35.603752, 'lon': 139.708745}}
{'name': '庚申公園', 'address': '東京都品川区中延5-13-17', 'note': '品川区中延5-13-17', 'location': {'lat': 35.60169, 'lon': 139.708685}}
{'name': '都立京浜運河緑道公園', 'address': '東京都品川区八潮1-', 'note': '品川区八潮1、八潮5', 'location': {'lat': 35.596782, 'lon': 139.748972}}
{'name': '都立大井ふ頭中央海浜公園', 'address': '東京都品川区八潮4-1-19', 'note': '東京都品川区八潮4-1-19', 'location': {'lat': 35.592501, 'lon': 139.752291}}
{'name': '旗の台東広場', 'address': '東京都品川区旗の台4-12-16', 'note': '品川区旗の台4-12-16', 'location': {'lat': 35.60214, 'lon': 139.70387}}
{'name': 'ごこう公園', 'address': '東京都品川区中延5-9-23', 'note': '品川区中延5-9-23区へ寄付された用地を公園として整備。周辺に花壇を施したシンプルなつくり。', 'location': {'lat': 35.602062, 'lon': 139.706797}}
{'name': 'ゆたか南公園', 'address': '東京都品川区豊町6-29-2', 'note': '品川区豊町6-29-2住宅の密集著しい地区の中にあるため、広場スペースが広く、防災機能を多く取り入れている。', 'location': {'lat': 35.604056, 'lon': 139.716339}}
{'name': '西大井四丁目特定児童遊園', 'address': '東京都品川区西大井4-23-12', 'note': '品川区西大井4-23-12', 'location': {'lat': 35.592907, 'lon': 139.719381}}
{'name': '南大井四丁目特定児童遊園', 'address': '東京都品川区南大井4-6', 'note': '品川区南大井4-6-20', 'location': {'lat': 35.596968, 'lon': 139.736822}}
{'name': '源氏前特定児童遊園', 'address': '東京都品川区中延6-4', 'note': '品川区中延6-4-8', 'location': {'lat': 35.602272, 'lon': 139.712272}}
{'name': '大井二丁目特定児童遊園', 'address': '東京都品川区大井2-5-15', 'note': '品川区大井2-5-15', 'location': {'lat': 35.604237, 'lon': 139.727564}}
{'name': '西大井六丁目特定児童遊園', 'address': '東京都品川区西大井6-5-5', 'note': '西大井6-5-5', 'location': {'lat': 35.60112, 'lon': 139.718687}}
{'name': '西大井三丁目特定児童遊園', 'address': '東京都品川区西大井3-4-14', 'note': '品川区西大井3-4-14', 'location': {'lat': 35.596942, 'lon': 139.723904}}
{'name': '豊四中央防災広場', 'address': '東京都品川区豊町4-17-1', 'note': '品川区豊町4-17-1', 'location': {'lat': 35.606713, 'lon': 139.720686}}
{'name': 'しながわ花海道水辺広場', 'address': '東京都品川区東大井1-13', 'note': '品川区東大井1-13先外勝島運河周辺の防潮堤上部。', 'location': {'lat': 35.598598, 'lon': 139.741246}}
{'name': '上蛇広場', 'address': '東京都品川区二葉4-3-10', 'note': '二葉4-3-10', 'location': {'lat': 35.602658, 'lon': 139.714435}}
{'name': 'ゆたか防災広場', 'address': '東京都品川区豊町6-11-1', 'note': '豊町6-11-1', 'location': {'lat': 35.605595, 'lon': 139.717657}}
{'name': '西大井六丁目ふれあい広場', 'address': '東京都品川区西大井6-3-1', 'note': '西大井6-3-1', 'location': {'lat': 35.601176, 'lon': 139.716261}}
{'name': '中延みちしるべ防災広場', 'address': '東京都品川区中延5-12-11', 'note': '住所\u3000中延5-12-11', 'location': {'lat': 35.601184, 'lon': 139.70821}}
{'name': '二葉中央のんき通り広場', 'address': '東京都品川区二葉3-17-14', 'note': '住所\u3000二葉3-17-14', 'location': {'lat': 35.604129, 'lon': 139.721404}}

ちなみに条件を3.5キロにすると以下のような結果になり、きちんと空間検索の条件がきいていることがわかります。

{'name': 'しながわ水族館', 'address': '東京都品川区勝島3-2-1しながわ区民公園内', 'note': '品川区勝島3-2-1しながわ区民公園内電話:3762-3431 交通: JR大井町駅から無料バス開館時間: 午前10時〜午後5時(入館は午後4時30分まで) 休館日: 毎週火曜日、1月1日 *春休み、ゴールデンウィーク、夏休みは営業', 'location': {'lat': 35.588634, 'lon': 139.737364}}
{'name': '大井海岸公園', 'address': '東京都品川区南大井3-27-5', 'note': '品川区南大井3-27-5', 'location': {'lat': 35.588463, 'lon': 139.733647}}
{'name': '大井坂下公園', 'address': '東京都品川区南大井6-23-11', 'note': '品川区南大井6-23-11', 'location': {'lat': 35.589516, 'lon': 139.730786}}
{'name': '西大井四丁目特定児童遊園', 'address': '東京都品川区西大井4-23-12', 'note': '品川区西大井4-23-12', 'location': {'lat': 35.592907, 'lon': 139.719381}}

さいごに

いかがでしたでしょうか?Elasticsearch を使えば 位置情報データの可視化や検索などが簡単にできます。Elasticsearch は年々人気が増しているサービスなので、今後のアップデートに関しても注目ですね。本日は以上です。