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

OpenMapTIles Map Server が爆誕していた件

OpenMapTIles Map Server が爆誕していた件

ちょっと調べました

Taro Matsuzawa aka. btm

September 08, 2017
Tweet

More Decks by Taro Matsuzawa aka. btm

Other Decks in Technology

Transcript

  1. 0QFO.BQ5JMFT.BQ
    4FSWFS͕ര஀ͯͨ݅͠
    5BSP.BUTV[BXB !TNFMMNBO

    (FPSFQVCMJD

    View full-size slide

  2. ͙͙ͬͨΒͳΜ͔͍ͨ
    IUUQTIVCEPDLFSDPNSLMPLBOUFDIPQFONBQUJMFTTFSWFS

    View full-size slide

  3. ͜ΕͬΆ͍
    IUUQTPQFONBQUJMFTDPNTFSWFS

    View full-size slide

  4. ಈ͔͢
    $ docker run --rm -it -v $(pwd):/data \
    -p 8080:80 klokantech/openmaptiles-server

    ίϚϯυΛݟ΍͍͢Α͏ೋߦʹͯ͠·͢

    View full-size slide

  5. ελʔτը໘

    View full-size slide

  6. ϦʔδϣϯΛબͿ

    View full-size slide

  7. ࢖͑ΔελΠϧΛબͿ

    View full-size slide

  8. ଞͷελΠϧ΋௥ՃͰ͖Δ
    "EWBODFE0QUJPOT

    View full-size slide

  9. ࠷ޙʹઃఆ

    View full-size slide

  10. ௥Ճͷઃఆ΋͋Δ

    View full-size slide

  11. %PXOMPBEΩʔήοτ͠Ζ

    View full-size slide

  12. Կʹ࢖͏͔ʹΑͬͯมΘΔ

    View full-size slide


  13. w 0QFO.BQ5JMFTͷμ΢ϯϩʔυ͸FEVDBUJPOͰ΋ΞΧ΢ϯ
    τ࡞੒͕ඞਢͩͬͨ͸ͣ
    w XJ[BSEܦ༝ͩͱͲ͏΋ೝূ͕ඞཁͳ͍ͬΆ͍
    w Μʁ

    View full-size slide

  14. ͜Ε͕ී௨

    View full-size slide

  15. ͳΔ΄σΟ΢ε
    ϞβΠΫ͔͚͚ͨͲόϨόϨͰ͸ʜ

    View full-size slide

  16. ؾΛऔΓ௚͠·͠ΐ͏ɻ

    View full-size slide

  17. μ΢ϯϩʔυΩʔ͕औಘͰ͖
    Ε͹μ΢ϯϩʔυ

    View full-size slide

  18. ׬੒ɻ
    Ͳ͏Έͯ΋UJMFTFSWFSHMͰ͢ɻ

    View full-size slide

  19. ͪΌΜͱ
    ϗεςΟϯάͰ͖·͢

    View full-size slide

  20. ࡞੒͞ΕΔ΋ͷ
    $ ls -la
    total 342824
    drwxr-xr-x+ 4 btm staff 136 9 9 07:54 .
    drwxr-xr-x+ 34 btm staff 1156 9 9 07:21 ..
    -rw-r--r--+ 1 btm staff 640 9 9 07:54 config.json
    -rw-r--r--+ 1 btm staff 175521792 9 9 07:54 osm-2017-07-03-
    v3.6.1-japan_tokyo.mbtiles

    View full-size slide

  21. DPOpHKTPO
    {
    "styles": {
    "standard": [
    "dark-matter",
    "klokantech-basic",
    "osm-bright",
    "positron"
    ],
    "custom": [],
    "lang": "",
    "langLatin": true,
    "langAlts": true
    },
    "settings": {
    "serve": {
    "vector": true,
    "raster": true,
    "services": true,
    "static": true
    },
    "raster": {
    "format": "PNG_256",
    "hidpi": 2,
    "maxsize": 2048
    },
    "server": {
    "title": "",
    "redirect": "",
    "domains": [
    "localhost:8081"
    ]
    },
    "memcache": {
    "size": 2,
    "servers": [
    "localhost:11211"
    ]
    }
    }
    }

    View full-size slide

  22. Θ͔ͬͨ͜ͱ

    w EPDLFSDPOUBJOFSͷத਎ʹ௚઀αʔόͷίʔυ͕͋Δ
    w VTSMPDBMTSDҎԼ͕த਎
    w VTSMPDBMTSDSVOTI͕αʔόͷىಈͷ࣮ମ
    w XJ[BSEͱ͍͏ΞϓϦ͕XJ[BSEͷத਎ͷ໛༷
    w UTHMKTPOͱ͍͏ϑΝΠϧΛੜ੒ͯͦ͠Ε͕͋Ε͹TVQFSWJTPSE
    Λಈ͔͢
    w UTHMKTPO͸UJMFTFSWFSHMͷKTPOϑΝΠϧ

    View full-size slide

  23. Θ͔ͬͨ͜ͱ

    w EBSLNBUUFSͷΈ1/(ը૾Λࢀর͢ΔελΠϧɻͳͥ͜
    ͏ͳͬͯΔͷ͔͸Θ͔ΒΜ
    w VTSMPDBMTSDBTTFUTʹϑΥϯτ΍ελΠϧͳͲΛೖΕ
    ͍ͯΔ
    w HJUIVC͔Βμ΢ϯϩʔυͨ͠΋ͷΛCTEUBSͰॲཧͯ͠
    ͍ͯौ͍

    View full-size slide

  24. ͨͿΜ
    w μ΢ϯϩʔυΩʔ͸μ΢ϯϩʔυͷͱ͖͚͔ͩ͠࢖Θͳ
    ͍
    w 1MBOFUΛҰ࣌ؒҎ಺ʹμ΢ϯϩʔυͰ͖ͪΌ͏ͱ
    FEVDBUJPOͰ΋1MBOFUͷ഑৴͕ग़དྷͯ͠·͏
    w ͍͍ͷ͔ͦΕ
    w ͦ΋ͦ΋HFUͰ͞Βͬͱ͋ͬͯͪΐͬͯͳΔ

    View full-size slide

  25. ·ͩݟͯͳ͍΋ͷ
    w NFNDBDIFEͷத਎͸EPDLFSDPOUBJOFSʹUFMOFU͕ೖͬ
    ͯͳ͔ͬͨͷͰఘΊͨ
    w ͜Ε͔Β04$౦ژʹ͍͘ͷͰʜ
    w XJ[BSEͷιʔείʔυ΋MFTT͕ͳͪ͘ΌΜͱݟΕͯͳ͍
    w ͱ͍͏͔͜Ε͔Β04$౦ژʹ͍͘ͷͰʜ

    View full-size slide

  26. ·ͱΊ
    w த਎͸UJMFTFSWFSHMͳΜͰ͋Δఔ౓͸͜Ε࢖Θͳͯ͘΋͋
    Δఔ౓࡞ΕΔ ͱ͍͏͔࡞ͬͯΔ

    w μ΢ϯϩʔυΩʔΛചΔͨΊͷ࢓૊Έͱͯ͠͸͋Δఔ౓͸
    Α͘Ͱ͖͍ͯͦ͏
    w ͱ͸͍͍͍͑ͷ͔ΞϨX

    View full-size slide