Upgrade to Pro — share decks privately, control downloads, hide ads and more …

GISとして活用するElasticsearch

3b93e7aa4ddd454a00fe6737854c938c?s=47 Takashi Funato
November 18, 2014

 GISとして活用するElasticsearch

3b93e7aa4ddd454a00fe6737854c938c?s=128

Takashi Funato

November 18, 2014
Tweet

Transcript

  1. GISͱͯ͠׆༻͢Δ Elasticsearch @tfunato ધށɹོ ୈ7ճelasticsearchษڧձ 2014/11/18

  2. Who am I ? • @tfunato ધށɹོ • ࢓ࣄɿJava԰ͰWeb԰ɻ࠷ۙ͸Hadoopͱ͔ •

    ϨίϝϯυΤϯδϯΆ͍ͷ࡞ͬͨΓ • جຊԿͰ΋԰ • ઃܭɺ։ൃɺηοτΞοϓɺӡ༻ • Java-ja͔Βདྷ·ͨ͠
  3. ElasticsearchͱҐஔ৘ใ • Ϛοϐϯά • geo point type • Ң౓ܦ౓ͷΠϯσΫγϯά •

    geohash • geo shape type • ଟ֯ܗͳͲͷܗΛΠϯσΫγϯά
  4. ElasticsearchͱҐஔ৘ใ • ϑΟϧλʔ • geo distance filter • Ң౓ܦ౓৘ใ͔Βͷڑ཭ •

    geo polygonfilter • ଟ֯ܗ಺ʹؚ·ΕΔϙΠϯτͷϑΟϧλ
  5. ElasticsearchͱҐஔ৘ใ • ͦͷଞExperimentalͳػೳ΋ • ଞ͸ɺ·ͩษڧதͰ͢

  6. ͳʹ͔ ࡞Εͳ͍͔ʁ

  7. Ґஔ৘ใ ͱ͍͑͹

  8. Ingress

  9. Ґஔ৘ใ ͱ͍͑͹

  10. Ingress

  11. IngressͷͤͭΊ͍ Ingress(ΠϯάϨε)͸Googleͷࣾ಺ελʔτΞοϓʮφΠΞϯςΟοΫϥϘʯʢNiantic Labsʣ͕։ൃɾӡӦ͢ΔɺεϚʔτϑΥϯʹରԠͨ͠ɺ֦ுݱ࣮ٕज़Λར༻ͨ͠ΦϯϥΠϯήʔϜɾҐஔ৘ใήʔϜɻ2012೥11݄ʹট଴੍Ͱϕʔλ൛ͷӡ༻͕։࢝͞Εɺ2013೥10݄ʹͩΕͰ΋ࢀՃՄೳͷ ΦʔϓϯϕʔλʹҠߦ͠ɺ2013೥12݄15೔ʹਖ਼ࣜӡ༻͕։࢝͞Εͨɻ౰ॳ͸Androidઐ༻Ͱ͕͋ͬͨɺ2014೥7݄23೔ΑΓiOSʹ΋ରԠͨ͠ɻϓϨΠ͢ΔͨΊͷΞϓϦέʔγϣϯ͸Google Play͓ΑͼApp StoreͰແྉͰఏڙ͞Ε͓ͯΓɺΞΠςϜ՝ۚ͸ଘࡏ͠ͳ͍ɻGoogleͷαʔϏεͰ͋Δͨ ΊɺϓϨΠʹ͸GmailΞΧ΢ϯτ͕ඞཁɻ·ͨGoogle+΁ͷࢀՃ͕ਪ঑͞Ε͍ͯΔɻΩϟονίϐʔ͸The world around you

    is not what it seems.ʢ͋ͳͨͷपΓͷੈք͸ɺݟͨ··ͷ΋ͷͱ͸ݶΒͳ͍ʣͰ͋ΔɻήʔϜͷίϯηϓτ͸ਞऔΓήʔϜͰ͋ΔɻϓϨΠϠʔ͸2ͭͷ੎ྗͷ͏ͪͷͲͪ Β͔ʹଐ͢Δɻੈք֤஍ʹଘࡏ͢ΔʮϙʔλϧʯΛࣗ੎ྗͷॴ༗ͱ͠ɺϙʔλϧಉ࢜ΛʮϦϯΫʯͯ͠ࡾ֯ܗΛඳ͘ͱɺͦͷ಺ଆ͕ʮίϯτϩʔϧϑΟʔϧυʯͱݺ͹ΕΔࣗਞʹͳΔɻͦͷ໘ੵͷେ͖͞Λڝ͏ɻ࠷େͷಛ௃͸ɺήʔϜϑΟʔϧυ͕ੈքͦͷ΋ͷɺݱ࣮ͷGoogle ϚοϓʹΑΔ஍ਤ ͦͷ΋ͷͩͱ͍͏͜ͱͰ͋Δɻϙʔλϧ͸શͯݱ࣮ੈքʹଘࡏ͢Δݐ଄෺ͳͲʹׂΓ౰ͯΒΕ͓ͯΓɺήʔϜதͰϙʔλϧΛ֬อ͢ΔͨΊʹ͸ɺ࣮ࡍʹͦͷ৔ॴ·Ͱߦ͔ͳ͚Ε͹͍͚ͳ͍ɻͦͷͨΊεϚʔτϑΥϯ্ͰGPSػೳΛ༗ޮʹ͢Δ͜ͱ͕ϓϨΠͷલఏͱͳ͍ͬͯΔɻεϚʔτϑΥϯͰΠ ϯλʔωοτ઀ଓͱGPSड৴͕Ͱ͖Ε͹ੈքதͲ͜Ͱ΋͜ͷήʔϜΛϓϨΠ͢Δ͜ͱ͕Ͱ͖ΔɻήʔϜͷഎܠͱͳΔετʔϦʔ͕ઃఆ͞Ε͓ͯΓɺಈըͳͲͷܗࣜͰগͣͭ͠ެ։͞Ε͍ͯΔɻ͜ͷετʔϦʔʹج͍ͮͨେن໛Πϕϯτ͕ൃੜ͢Δ͜ͱ΋͋ΓɺΠϕϯτͰͷ྆ਞӦͷ݁Ռ͸ετʔ Ϧʔʹ΋ӨڹΛٴ΅͢ɻݱ࣮ੈքͰల։͞ΕΔͱ͍͏ήʔϜͷಛੑ্ɺಛఆͷ஍ҬͷϓϨΠϠʔ͕ίϛϡχςΟΛ࡞੒ͨ͠ΓɺΦϑϥΠϯϛʔςΟϯάΛߦͬͨΓ͢Δػձ͕ଟ͍ɻ·ͨɺؠखݝͷΑ͏ʹIngressΛ؍ޫৼڵʹ׆༻͢Δ࣏ࣗମ΋ग़ݱͨ͠ɻήʔϜ಺՝ۚΞΠςϜ͸ଘࡏ͠ͳ͍΋ͷ ͷɺεϚʔτϑΥϯ༻ϞόΠϧόοςϦʔ΍ҠಈඅͳͲͷIngressʹؔ܎͢Δग़අ͸ϢʔβͷؒͰ௨শʮϦΞϧ՝ۚʯͱݺ͹ΕΔɻΤʔδΣϯτ[ฤू] ϓϨΠϠʔ͸ʮΤϯϥΠςϯυʯ͔ʮϨδελϯεʯɺͲͪΒͷ੎ྗʢFactionʣͷΤʔδΣϯτʹͳΔ͔ΛબΜͰήʔϜΛ։࢝͢Δɻ ίʔυωʔϜʢϓϨΠϠʔ໊ʣ͓Αͼॴଐ੎ྗ͸ݪଇͱͯ͠ม͑Δ͜ͱ͸Ͱ͖ͳ͍ɻ·ͨɺҐஔ৘ใ͔Βੜ׆ൣғ͕෼͔Δ৔߹΋͋ΔͨΊɺίʔυωʔϜ͸ଞͷ׆ಈͱ͸ؔ܎ͳ͍ಗ໊ੑͷߴ͍΋ͷ͕ਪ঑͞Ε͍ͯΔ[7]ɻ ίʔυωʔϜ͸ޡͬͯຊ໊Λೖྗͯ͠͠·ͬͨ৔߹ͳͲͷΈมߋՄೳͰ͋Δ͕ɺGoogleͷ৹ࠪΛܦΔඞཁ͕͋Δ[8]ɻ ੎ྗΛมߋ͢Δ৔߹΋ਃ੥͕ඞཁͰ͋ΔɻڐՄ͞ΕΔͷ͸1ϓϨʔϠʔʹ͖ͭ1ճͰɺมߋޙ͸ΞΠςϜɾܦݧ஋ͳͲ͕શͯॳظԽ͞ΕΔ[8]ɻ ήʔϜதͰΤϯϥΠςϯυ͸྘ɺϨδελϯε͸੨ɺதཱ͸നͰද͞ΕΔɻ ϙʔλϧɾϨκωʔλʔ จԽతɾܳज़తɾफڭతʹॏཁͳ৔ॴ͕ϙʔλϧͱͳ͍ͬͯΔɻ ۩ମతʹ͸࢙੻ɺه೦ൾɺூ૾ɺύϒϦοΫΞʔτɺਤॻؗɺ༣ศہɺӺɺڭձɺਆࣾͳͲ[9][10]ɻ ͨͩ͠ɺେֶΛআֶ͘ߍ΍ɺফ๷ॺ΍පӃɺܯ࡯ॺͷΑ͏ͳڌ఺ɺݸਓͷ୐஍ɺةݥͳ৔ॴɺܠ؍ɺӬٱతͰͳ͍΋ͷʹ͍ͭͯ͸ঝೝ͞Εͳ͍Մೳੑ͕ߴ͍ͱ͞ΕΔɻ ͦͷ஍ҬͰϙʔλϧʹద͢ΔͱࢥΘΕΔ৔ॴ͕͋Ε͹ɺήʔϜ্͔Β৽نϙʔλϧͷީิͱͯ͠ਃ੥͢Δ͜ͱ͕Ͱ͖ΔɻӡӦʹͯ৹ࠪ͠ೝΊΒΕΕ͹৽ͨʹϙʔλϧ͕૿͑Δɻ ϙʔλϧͷ৹ࠪʹཁ͢Δظؒ͸3ʙ4िؒͱ͞Ε͍ͯΔɻ ϙʔλϧ͔Β40ϝʔτϧҎ಺ʹ͖ۙͮɺϙʔλϧΛʮϋοΫʯ͢Δͱ֤छΞΠςϜ͕खʹೖΔɻ ग़ݱ͢ΔΞΠςϜͷϨϕϧ͸ϙʔλϧ͓ΑͼϓϨΠϠʔͷϨϕϧʹґଘ͢Δɻ ఢ੎ྗͷϙʔλϧΛϋοΫ͢ΔͱΞΠςϜʹՃ͑ͯAPʢܦݧ஋ʣ͕खʹೖΔ͕ɺϙʔλϧ͔Βͷ൓ܸͰࣗΒͷXM͕ݮগ͢Δɻ ϙʔλϧʹʮϨκωʔλʯ(Resonator)Λઃஔ͢Δͱͦͷϙʔλϧ͕ࣗ੎ྗͷ΋ͷͱͳΔɻ ఢ੎ྗͷϙʔλϧʹରͯ͠͸ɺʮXMPόʔελʔʯʢXMP Bursterʣͱ͍͏ΞΠςϜͰશͯͷϨκωʔλΛഁյ͠ɺ͍ͬͨΜதཱʹ໭͔ͯ͠ΒϨκωʔλΛઃஔ͢Δͱࣗ੎ྗͷ΋ͷͱͳΔɻ ϙʔλϧʹ͸MODͱΑ͹ΕΔΞΠςϜΛઃஔ͢Δ͜ͱ͕ՄೳɻΞΠςϜʹΑͬͯޙड़ͷϦϯΫՄೳͳڑ཭͕৳ͼͨΓɺ߈ܸ΁ͷ଱ੑ͕޲্ͨ͠Γ͢Δɻ ϦϯΫͱίϯτϩʔϧϑΟʔϧυ ϙʔλϧʹϨκωʔλΛ8ຊઃஔ͢Δͱͦͷϙʔλϧ͔Βଞͷࣗ੎ྗͷϙʔλϧΛʮϦϯΫʯ͢Δ͜ͱ͕Ͱ͖Δɻ ϙʔλϧಉ࢜ΛϦϯΫ͢Δʹ͸ɺϦϯΫઌϙʔλϧͷʮϙʔλϧΩʔʯ͕ඞཁʹͳΔɻϙʔλϧΩʔ͸ϋοΫͰಘΔ͜ͱ͕Ͱ͖ΔΞΠςϜͷҰछͰ͋Δɻ ϙʔλϧͷϨϕϧʹΑͬͯϦϯΫՄೳͳڑ཭͸มԽ͢Δ[12]ɻ࠷ߴϨϕϧʢϨϕϧ8ʣͷϙʔλϧͰ655kmɺߋʹMOD(Very Rare Link Amp)Λซ༻͢Ε͹࠷௕6877kmͷڑ཭ͰϦϯΫ͕ՄೳͱͳΔɻ 3ͭͷϙʔλϧΛࡾ֯ܗΛඳ͘Α͏ʹϦϯΫ͢Δͱɺ஍ਤ্ͷͦͷ෦෼͕ࣗ੎ྗͷʮίϯτϩʔϧϑΟʔϧυʯ(Control Field, CF)ͱͳΔɻίϯτϩʔϧϑΟʔϧυΛ࡞੒͢Δͱɺͦͷ໘ੵͱਓޱີ౓ʹԠͨ͡ʮϚΠϯυϢχοτʯ(MU)ͱݺ͹ΕΔಘ఺͕खʹೖΔɻ ਓޱີ౓͕Өڹ͢ΔͨΊɺಉ͡໘ੵͷίϯτϩʔϧϑΟʔϧυͳΒ͹஍ํΑΓ΋౎ࢢ෦ͷํ͕MUͷ஋͕େ͖͘ͳΔ[12]ɻ ٯʹɺఢ੎ྗͷίϯτϩʔϧϑΟʔϧυΛߏ੒͍ͯ͠ΔϙʔλϧͷϨκωʔλΛഁյ͠தཱʹ໭͢ͱɺϦϯΫ͓ΑͼίϯτϩʔϧϑΟʔϧυ΋ഁյ͞Εɺͦͷ෼ͷMUΛݮগͤ͞Δ͜ͱ͕Ͱ͖Δɻ ྆੎ྗͰMUͷ஋͕ଟ͍΄͏͕༏੎ͱͳΔɻ ஍ٿද໘Λ24,576෼ׂ֤ͨ͠ηϧʢ஍ҬʣͰɺ175࣌ؒαΠΫϧ͝ͱʹ࢒ଘ͍ͯ͠ΔίϯτϩʔϧϑΟʔϧυͷMU஋͕ूܭ͞Εͯউഊ͕ܾ·Γɺ͞Βʹશ஍ҬͷMU஋͕߹ࢉ͞ΕੈքϨϕϧͰͷউഊ͕ܾ·Δɻ Ϩϕϧ ΤʔδΣϯτɺϙʔλϧɺΞΠςϜʢϨκωʔλ΍XMPόʔελʔʣʹ͸͢΂ͯʮϨϕϧʯ͕͋ΔɻΞΠςϜͷϨϕϧ͸1͔Β8·ͰͰ͋Δ͕ɺΤʔδΣϯτͷϨϕϧ͸9Ҏ্΋ઃఆ͞Ε͍ͯΔɻ ΤʔδΣϯτͷϨϕϧ͸APʢAccess Pointsʣͱݺ͹ΕΔܦݧ஋ΛੵΉ͜ͱͰ্͕͍ͬͯ͘ɻϨϕϧ8·Ͱ͸APͷΈͰୡ੒Ͱ͖Δ͕ɺϨϕϧ9Ҏ্͸APʹՃ͑ͯϝμϧͱݺ͹ΕΔ࣮੷΋Ұఆ਺֫ಘ͢Δඞཁ͕͋Δɻ ࢖༻Ͱ͖ΔΞΠςϜ͸ΤʔδΣϯτͷϨϕϧʹґଘ͢Δɻྫ͑͹ɺϨϕϧ1ͷΤʔδΣϯτ͸Ϩϕϧ2Ҏ্ͷΞΠςϜΛ࢖༻Ͱ͖ͳ͍ɻ લड़ͷͱ͓ΓɺΞΠςϜͷϨϕϧ͸8·ͰͰ͋ΔͨΊɺΤʔδΣϯτͷϨϕϧ͕8ʹͳΕ͹ଘࡏ͢ΔΞΠςϜ͕શͯ࢖༻Ͱ͖Δɻ ϙʔλϧͷϨϕϧ͸ΞΠςϜͷ1ͭͰ͋ΔϨκωʔλʹґଘ͢ΔͨΊɺߴϨϕϧͷϙʔλϧΛ࡞Δʹ͸ߴϨϕϧͷΤʔδΣϯτ͕ඞཁͱͳΔɻϨκωʔλͷഁյ΋ಉ༷Ͱ͋Δɻ 7JB8JLJQFEJB
  12. ཁ͸੨ͱ྘ʹ෼͔Εͯ ஍ਤ্ʹϚοϓ͞Εͨ ڌ఺ΛऔΓ߹͏ήʔϜ

  13. IngressͰ݁ߏେࣄͳ͜ͱ •ఢͷߦಈཤྺ •ग़຅৔ॴ •ߦಈ࣌ؒ ܏޲ͱରࡦʂ

  14. Ingressͷެࣜπʔϧͷ
 IntelMapΛ࢖༻͢Δͱ ͍ͭͲ͜Ͱ୭͕ԿΛ͍ͯͨ͠ ͷ͔Θ͔Δʂ

  15. None
  16. APIΛϋοΫͯ͠ ElasticsearchʹͿͬ͜Ή

  17. ࢓૊Έ IntelMapͷAjax௨৴ΛRubyͰِ૷ͯ͠ɺ ௨৴σʔλΛ੔ܗͯ͠ElasticsearchʹͿͬ ͜Έ·͢ɻͦΕΛɺKibanaͰදࣔɻ

  18. σϞ

  19. ·ͱΊ •ElasticsearchͱҐஔ৘ใ͸૬ੑ͕͍͍ •Ingress͸΄Ͳ΄Ͳʹ •Ingress͸੨৭͕͓קΊͰ͢

  20. Θ͕RegistanceͰ͸ ຊ෺ͷΤʔδΣϯτΛืू͓ͯ͠Γ·͢ ·ͨɺIngress Resistance Tokyo, Japan ͱ͍͏G+ίϛϡχςΟͰ͓ޓ͍࿈ܞΛ औΓͳ͕Β׆ಈΛߦ͍ͬͯ·͢ͷͰ ͪ͜ΒΑΓɺࢀՃΛ͓଴͓ͪͯ͠Γ·͢ http://join.resist.tokyo

  21. ͝ਗ਼ௌ ͋Γ͕ͱ͏͍͟͝·ͨ͠