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

FOSS4G Tokyo 2017 ハンズオンデイ: OpenMapTilesで始めるOpenStreetMapのベクトルタイル配信

FOSS4G Tokyo 2017 ハンズオンデイ: OpenMapTilesで始めるOpenStreetMapのベクトルタイル配信

Taro Matsuzawa aka. btm

September 14, 2017
Tweet

More Decks by Taro Matsuzawa aka. btm

Other Decks in Technology

Transcript

  1. '044(5PLZP)BOETPO
    0QFO.BQ5JMFTͰ࢝ΊΔ
    0QFO4USFFU.BQͷϕΫτϧλΠϧ഑৴
    5BSP.BUTV[BXB !TNFMMNBO

    (FPSFQVCMJD
    04(FPࡒஂ೔ຊࢧ෦0QFO4USFFU.BQ
    'PVOEBUJPO+BQBO೔ຊ6/*9Ϣʔβձ

    View Slide

  2. ࠓճͷ͓୊
    w ࡞ۀલͷΠϯετʔϧ
    w 0QFO.BQ5JMFTʹ͍ͭͯͷߨٛ
    w 0QFO.BQ5JMFTͰϕΫτϧλΠϧΛ࡞੒ͱ֬ೝ
    w UJMFTFSWFSHMͷىಈʹ͍ͭͯ
    w .BQVUOJLͷىಈٴͼ؆୯ͳૢ࡞આ໌
    w 0QFO.BQ5JMFTʹ͍ͭͯͷิ଍

    View Slide

  3. ࣗݾ঺հ
    w(FPSFQVCMDγχΞσϕϩούʔ
    wϓϩάϥϚͰ͢
    wλΠϧٕज़͕޷͖Ͱ͢
    wλΠϧࡾܑఋͷҰຯ
    w৭ʑॴଐͯ͠·͢
    w04(FPࡒஂ೔ຊࢧ෦
    w04.'+
    w೔ຊ6/*9Ϣʔβձ
    w.P[JMMB$PNNVOJUZJO+BQBO
    wϒϨΠΫίΞΫϥελ

    View Slide

  4. αϙʔτϖʔδ
    w ࠓճ࢖͏ίϚϯυ͸શͯҎԼͷϖʔδ͔ΒϖʔετͰ͖·
    ͢
    IUUQTHJUIVCDPNTNFMMNBOGPTTHUPLZPIBOETPOPQFONBQUJMFT

    View Slide

  5. ࡞ۀલͷΠϯετʔϧ

    View Slide

  6. λʔήοτ
    w λʔήοτ͸6CVOUVͱ͠·͢
    w ඞཁͳύοέʔδ͸ҎԼͷ௨ΓͰ͢
    HJU PQFONBQUJMFTΛऔಘʹඞཁ

    NBLF PQFONBQUJMFTͷλεΫ࣮ߦʹར༻

    CD RVJDLTUBSUTIͰܭࢉʹ࢖͏

    HBXL RVJDLTUBSUTIͰར༻ɺͳ͔ͥBXL΋࢖ͬͯΔ

    EPDLFSJP %PDLFSͷຊମɺEPDLFSͱ͍͏ଞͷύοέʔ
    δ͕͋ΔͷͰ஫ҙ

    EPDLFSDPNQPTF ෳ਺ͷ%PDLFSΛ·ͱΊΔ࢓૊Έ

    View Slide

  7. Πϯετʔϧखॱ
    sudo apt -y install git make bc gawk docker.io docker-compose
    sudo usermod -aG docker $USER
    w VTFSNPEͰҰൠϢʔβ͕EPDLFSΛѻ͑ΔΑ͏ʹ͠·͢ɻ
    w ͜ͷ͋ͱϦϒʔτΛ͠·͢
    docker run hello-world
    w ҰൠϢʔβͰEPDLFSSVOΛߦ͍ಈ࡞ςετΛߦ͍·͢ɻ
    w ͜Ε͕੒ޭͨ͠Β࣍΁ਐΈ·͢

    View Slide

  8. PQFONBQUJMFTΛऔಘ
    git clone https://github.com/openmaptiles/openmaptiles.git
    w PQFONBQUJMFTͷϨϙδτϦΛऔಘ͠·͢
    cd openmaptiles
    docker-compose pull
    w EPDLFSDPNQPTFQVMMͰඞཁͳίϯςφΛऔಘ͠·͢
    w ͕͔͔࣌ؒΔͷͰ์ஔ͠·͠ΐ͏
    w औಘΛ͢Δͱ(#͙Β͍σΟεΫΛফඅ͠·͢

    View Slide

  9. 0QFO.BQ5JMFTʹ͍ͭ
    ͯͷߨٛ

    View Slide

  10. ֓ཁ
    w 0QFO4USFFU.BQͷϕΫτϧλΠϧ .BQCPY7FDUPS5JMF

    Λ࡞੒͢ΔͨΊͷ'044ɺ·ͨͦΕΛݩʹͨ͠঎༻αʔϏ
    ε
    w IUUQTPQFONBQUJMFTPSH044
    w IUUQTPQFONBQUJMFTDPN঎༻αʔϏε
    w ࠓճ͸044ͷΈΛѻ͍·͢
    w աڈʹ͸04.7FDUPS5JMFTͱ͍͏໊લͷ΋ͷΛ৽͘͠
    ͨ͠΋ͷ

    View Slide

  11. ಛ௕
    w σʔλ࡞੒ͷͨΊʹ࢖͏αʔό΍πʔϧΛ%PDLFSٴͼ
    %PDLFS$PNQPTFΛ࢖ͬͨ࢓૊ΈͰఏڙ
    w 04Λ໰Θͣಈ͖·͢
    w ؆қίϚϯυ͕͋ΔͨΊɺൺֱత؆୯ʹʮ࡞੒ʯ͸Մೳ
    w EPDLFSDPNQPTFQVMM͕ऴΘ͍ͬͯͨΒίϚϯυϥΠ
    ϯҰߦͰ࡞੒Մೳ

    View Slide

  12. %PDLFSͱ͸
    w ͬ͘͟Γݴ͏ͱʮιϑτ΢ΣΞίϯςφʯ
    w ίϯςφٕज़ʹؔͯ͠͸͍Ζ͍Ζ͋ΔͷͰಛʹ৮Ε·
    ͤΜ
    w ιϑτ΢ΣΞʹϑΥʔΧεΛ͋ͯͯίϯςφͱ͍͏୯
    ҐͰ؅ཧ͢Δ͜ͱͰ։ൃऀʹͱͬͯѻ͍΍͍͢୯ҐͰ
    ιϑτ΢ΣΞΛѻ͏͜ͱ͕Ͱ͖Δ

    View Slide

  13. ఏڙ͞ΕΔίϯςφ
    w 0QFO.BQ5JMFTͰఏڙ͞ΕΔίϯςφʹ͸ҎԼͷΑ͏ͳ΋ͷ
    ͕͋Δ
    w σʔλΛऔΓࠐΉͨΊͷ1PTUHSF42-1PTU(*4
    w 04.σʔλͷऔΓࠐΈɺߋ৽πʔϧ
    w (FPGBCSJL͔Βμ΢ϯϩʔυπʔϧ
    w /BUVSBM&BSUIσʔλͳͲ04.Ҏ֎ͷσʔλͷऔΓࠐΈ
    πʔϧٴͼσʔλ
    w ग़ྗπʔϧ .BQCPY7FDUPS5JMFͷαʔϒٴͼ.#5JMFT΁
    ͷग़ྗ

    View Slide

  14. αϙʔτπʔϧ
    w .BLFpMF
    w 0QFO.BQ5JMFT͕ར༻͢ΔҰ෦ͷπʔϧΛλεΫԽ
    w ϝϯςφϯεͳͲʹར༻
    w RVJDLTUBSUTI
    w ؆қίϚϯυ
    w ຖճ࡞Γ௚͢ͳΒ͜ͷίϚϯυ͚ͩͰࣄ଍ΓΔ

    View Slide

  15. ೖྗग़ྗ
    w ೖྗ
    w 0QFO4USFFU.BQσʔλ 1SPUPDPM#V⒎FSܗࣜ

    w /BUVSBM&BSUI 8BUFS 04.#PSEFS -BLF-JOF
    w 04.σʔλҎ֎͸%PDLFSͰఏڙ
    w ग़ྗ
    w .BQCPY7FDUPS5JMFTΛ.#5JMFTܗࣜʹ·ͱΊͨ΋ͷ

    View Slide

  16. ஫ҙ఺
    w ࠩ෼ΠϯϙʔτͳͲ͸Մೳ͕ͩɺ֤πʔϧ܊ͷڍಈʹ͍ͭ
    ͯৄ͘͠஌Δඞཁ͕͋Δ
    w νϡʔχϯάʹ͸JNQPTNͷ஌͕ࣝલఏͱͳΔ
    w ͋ͱͰͬ͘͟Γઆ໌͠·͢
    w .#5JMFTʹ͢Δඞཁ͕ͳ͚Ε͹௚઀TFSWF͢Δ͜ͱ΋Ͱ͖
    Δ
    w ͨͩ͠ɺϝλσʔλ͕ͳ͍ͱσβΠϯ͕ਏ͍

    View Slide

  17. .BQCPY7FDUPS5JMF
    w .BQCPY͕ࣾ࡞੒ͨ͠ϕΫτϧλΠϧͷ࢓༷
    w 1SPUPDPM#V⒎FSܗࣜͰΤϯίʔυ͞Ε͍ͯΔ
    w ϥελλΠϧʹൺ΂Δͱ͔ͳΓখ͍͞

    View Slide

  18. .#5JMFT
    w .BQCPY͕ࣾ࡞੒ͨ͠λΠϧίϯςφͷ࢓༷
    w த਎͸42-JUF
    w ϝλσʔλ͕ೖΕΒΕΔ
    w ࢓༷ͱͯ͠த਎͕5.4ͷϨΠΞ΢τͳͷͰ஫ҙ

    View Slide

  19. جຊతͳྲྀΕ
    04.σʔλ QCGϑΝ
    Πϧ
    Λ(FPGBCSJDL͔Βμ
    ΢ϯϩʔυ
    PQFONBQUJMFTUPPMT
    ͰCVJMEҎԼʹϑΝΠϧΛ
    ࡞੒
    1PTUHSF42- 1PTU(*4
    Λ
    ىಈ
    XBUFS PTNCPSEFS
    OBUVSBMFBSUI MBLFMJOFT
    ΛΠϯϙʔτ
    JNQPTNΛ࢖ͬͯ04.
    σʔλΛΠϯϙʔτ
    ϕΫτϧλΠϧΛग़ྗ
    ͢Δͷʹར༻͢Δ42- ؔ

    ΛΠϯϙʔτ
    .BQCPY7FDUPS5JMFΛ
    .#5JMFTܗࣜʹग़ྗ
    .#5JMFTʹ
    ϝλσʔλΛ෇༩
    %PDLFSίϯςφΛ
    ΫϦʔϯΞοϓ
    1PTUHSF42- 1PTU(*4
    Λ
    ఀࢭ

    View Slide

  20. 0QFO.BQ5JMFTͰϕΫ
    τϧλΠϧΛ࡞੒ͱ֬ೝ

    View Slide

  21. 0QFO.BQ5JMFTͰϕΫτϧλ
    ΠϧΛ࡞੒
    w جຊతʹRVJDLTUBSUTIΛ࣮ߦ͢Δ
    ./quickstart.sh
    w Ҿ਺ͳ͠Ͱ࣮ߦ͢ΔͱΞϧόχΞͷλΠϧΛζʔϜϨϕϧ͔ΒͰ࡞੒͠·͢
    w ΞϧόχΞ͸σʔλ͕ൺֱతখ͍ͨ͞ΊɺνΣοΫ༻ʹ࢖ΘΕ͍ͯ·͢
    w Ҿ਺ʹࠃ໊ΛೖΕΔͱͦͷࠃͷλΠϧΛग़ྗ͠·͢
    w ରԠ͍ͯ͠Δࠃ͸NBLFMJTUͰ֬ೝͰ͖·͢
    w ࠓճ͸͕͔͔࣌ؒΔͷͰ࣮ߦ͠ͳ͍͜ͱ

    View Slide

  22. ࡞੒ޙͷνΣοΫ
    w NBLFTUBSUUJMFTFSWFSΛ࣮ߦ͢Δ
    make start-tileserver
    w %PDLFSͰىಈ͢Δͱ͍͏ํ๏΋͋Δ
    docker pull klokantech/tileserver-gl

    docker run -it --rm -v $$(pwd)/data:/data \
    -p 8080:80 klokantech/tileserver-gl
    w NBLF͸্هίϚϯυΛλεΫʹ͍ͯ͠Δ͚ͩ

    View Slide

  23. ࡞੒ޙͷϑΝΠϧ
    w EBUBUJMFTNCUJMFT͕ग़ྗϑΝΠϧͱͳΔ
    w RVJDLTUBSUTIΛ࣮ߦ͢Δͱফ͞ΕΔͷͰ஫ҙ
    w ͏͔ͬΓ͢ΔͱԿ౓΋࡞Γ௚͢ϋϝʹͳΔ

    View Slide

  24. UJMFTFSWFSHMͷىಈʹ
    ͍ͭͯ

    View Slide

  25. UJMFTFSWFSHM
    w UJMFTFSWFSHM͸.BQCPY7FDUPS5JMFͷ഑৴αʔό
    w 7FDUPS5JMFҎ֎ʹ΋ελΠϧϑΝΠϧͱ૊Έ߹Θͤͯ
    αʔό಺ͰϥελϨϯμϦϯάΛ͢Δ͜ͱ΋Մೳ
    w .BQCPY(-4UZMFͰॏཁͱͳΔϑΥϯτͷ഑৴΋Մೳ
    w ৄࡉ͸໌೔ͷൃදʹͯ࿩͠·͢
    w %PDLFS΋͘͠͸OQNͰΠϯετʔϧΛ࣮ͯ͠ߦ

    View Slide

  26. UJMFTFSWFSHMͷ࣮ߦ
    w ͲͪΒ΋NCUJMFT͕͋ΔσΟϨΫτϦͰ࣮ߦ͢Δ
    w %PDLFSͷ৔߹
    docker run -it --rm -v $(pwd):/data \
    -p 8080:80 klokantech/tileserver-gl
    npm install -g tileserver-gl
    cd $(directory contain mbtiles)
    tileserver-gl -p 8080
    w OQNͷ৔߹

    View Slide

  27. UJMFTFSWFSHMͷڍಈ
    w UJMFTFSWFSHM͸ىಈͨ͠σΟϨΫτϦʹ͋ΔϑΝΠϧΛࣗ
    ಈతʹಡΈऔΔ
    w DPOpHKTPO͸ઃఆϑΝΠϧͱͳΔɺDΦϓγϣϯͰ
    ࢦఆ΋Մೳ
    w DPOpHKTPOͳͲ͕ͳ͘NCUJMFT͚ͩ͋Ε͹ͦΕΛࣗ
    ಈతʹWͱ͍͏JEFOUJpFSͰར༻͢Δ
    w %PDLFSͷ৔߹͸EBUBʹϚ΢ϯτͨ͠ҐஔͰىಈ
    w ҰൠϢʔβͰىಈ͢Δͱ͖͸QͰQPSUΛࢦఆ͢Δ

    View Slide

  28. UJMFTFSWFSHMͷDPOpH
    w UJMFTFSWFSHM͸ίϯϑΟάͰ͸ҎԼͷઃఆ͕Մೳ
    w σʔλɺϑΥϯτɺTQSJUFɺTUZMFͷҐஔͷௐ੔
    w ෳ਺ͷσʔλ഑৴
    w .BQCPY(-4UZMFͷ഑৴ઃఆ
    w ͳͲͳͲ

    View Slide

  29. %PDLFSͱOQNͰͷҧ͍
    w %PDLFS͸಺෦Ͱ9WGCΛىಈ࣮ͯ͠ߦ
    w 9WGCͷىಈޙTMFFQ͔ͯ͠Βىಈ͍ͯ͠Δ͕ɺͨ·
    ʹ9WGCͷىಈʹؒʹ߹Θͳ͍Ͱىಈ͠ͳ͍͜ͱ͕͋Δ
    w OQNͰΠϯετʔϧͨ͠৔߹Ͱ΋9EJTQMBZ͸ඞཁ
    -JOVY

    w NBD04Ͱ͸ಛʹӨڹͳ͠
    w ͦͷଞ͸͋·Γҧ͍͕ͳ͍ ະݕূ

    View Slide

  30. .BQVUOJLͷىಈٴͼ
    ؆୯ͳૢ࡞આ໌

    View Slide

  31. .BQVUOJL
    w .BQCPY4UVEJPͷ$MPOFͱͯ͠Ϋϥ΢υϑΝ΢ϯσΟϯ
    άΛ௨ͯ͠ࢿۚूΊΛͯ͠࡞੒͞ΕͨΤσΟλ
    w .BQCPY(-4UZMFͷΤσΟλͱͯ͠ಈ࡞
    w ΦϯϥΠϯ൛͕͋Δ͕ࠓճ͸MPDBMIPTUͰͷಈ࡞ͷͨΊΦ
    ϑϥΠϯͰར༻͢Δ
    w ΦϯϥΠϯ൛Ͱ͸ηΩϡϦςΟͷͨΊMPDBMIPTUͷ
    UJMFTFSWFSHM͕഑৴ͨ͠.BQCPY7FDUPS5JMF͕ಡΈࠐ
    Ίͳ͍ͨΊ

    View Slide

  32. .BQVUOJLͷ࣮ߦ
    w ͲͷσΟϨΫτϦͰ΋ྑ͍
    w %PDLFSͷ৔߹
    docker run docker run -d -p 8888:8888 maputnik/editor
    npm install -g serve
    wget https://github.com/maputnik/editor/releases/download/
    v1.0.2/public.zip
    unzip public.zip
    serve -p 8888
    w OQN TFSWF
    ͷ৔߹

    View Slide

  33. .BQVUOJLͷಛ௕
    w .BQVUOJLࣗମ͸3FBDUͰॻ͔ΕͨγϯάϧϖʔδΞϓϦ
    έʔγϣϯ
    w αʔό্ʹ഑ஔ͢Δ͚ͩͰಈ࡞͢Δ
    w લϖʔδͰ࢖ͬͨTFSWF͸ىಈͨ͠σΟϨΫτϦ্Λϗ
    εςΟϯά͢Δ͚ͩͷ)551αʔόϓϩάϥϜ

    View Slide

  34. 0QFO.BQ5JMFTʹ͍ͭ
    ͯͷิ଍આ໌

    View Slide

  35. ζʔϜϨϕϧͷมߋ
    ࠶μ΢ϯϩʔυ

    w FOWΛมߋ͢Δύλʔϯ
    ΤσΟλͰFOWϑΝΠϧΛमਖ਼
    EBUBσΟϨΫτϦΛ࡟আ SPPUݖݶ͕ඞཁ

    RVJDLTUBSUTIΛ࠶࣮ߦ
    vim .env
    sudo rm -fr data
    ./quickstart.sh

    View Slide

  36. ζʔϜϨϕϧͷมߋ
    04.σʔλΛ࢖͍ճ͢

    w EPDLFSDPNQPTFDPOpHZNMΛฤू͢Δ
    ΤσΟλͰEBUBEPDLFSDPNQPTFDPOpHZNMϑΝ
    ΠϧΛमਖ਼
    RVJDLTUBSUTIΛ࠶࣮ߦ
    vim data/docker-compose.yml
    ./quickstart.sh

    View Slide

  37. ζʔϜϨϕϧมߋͷ໰୊఺
    w EBUBEPDLFSDPNQPTFDPOpHZNMʹζʔϜϨϕϧΛࢦఆ͞Ε͍ͯΔ
    w ͜ͷϑΝΠϧΛ࡞੒͢Δͷ͸NBLFEPXOMPBEHFPGBCSJLλεΫͷΈ
    w ͢ͰʹEBUB ࠃ໊
    PTNQCG͕͋Δ৔߹͸͜ͷλεΫΛεΩοϓ
    ͢Δ
    w NBLFEPXOMPBEHFPGBCSJLΛखಈͰ࣮ߦ͢ΔͱݩͷPTNQCGΛ
    ࡟আ͢ΔͷͰҙຯ͕ͳ͍
    w ࠓͷͱ͜ΖΞοϓσʔτΛ͢Δ͚ͩͷλεΫ͸ແ͍

    View Slide

  38. ൺֱ ΞϧόχΞ

    [[ [[
    5IJOLQBE9
    $PSFJDPSF
    (#.FNPSZ44%
    NJO NJO
    .BDCPPL1SP NJE

    $PSFJDPSF
    (#.FNPSZ44%
    NJO ଌఆෆՄ ϋϯάΞοϓ

    ͘͞ΒΫϥ΢υ
    DPSF(#.FNPSZ
    NJO ܭଌͰ͖ͣ
    ग़ྗαΠζ ,# .#

    View Slide

  39. ಺෦Ͱ࢖͏ϓϩάϥϜ
    w JNQPTN
    w 04.σʔλͷΠϯϙʔτʹར༻
    w UJMFMJWFDPQZ
    w UJMFMJWFͷιʔε͔Β.#5JMFTܗࣜʹग़ྗ͢Δͷʹར༻
    w 0QFO.BQ5JMFTͰ͸UN .BQCPY4UVEJP$MBTTJD
    ͱͯ͠ѻ͏
    w QPTUTFSWF
    w 1PTU(*4͔Β.BQCPY7FDUPS5JMFܗࣜʹग़ྗ͢ΔͨΊͷαʔό
    w [email protected]"4.75ؔ਺Λར༻
    w ͳ͓ɺىಈ͢Δ͕ར༻͸͞Εͯͳ͍ Ṗ

    View Slide

  40. JNQPTNʹ͍ͭͯ
    w 04.σʔλΛΠϯϙʔτʹ࢖͏ϓϩάϥϜ
    w IUUQTHJUIVCDPNPNOJTDBMFJNQPTN
    w (PݴޠͰॻ͔Ε͍ͯͯඇৗʹૣ͍
    w ೖྗ͸ZBNMͰఆٛ͢Δ
    w ࠩ෼ΠϯϙʔτΛ͢Δ৔߹͸͜Ε͕Ͳ͏࢖ΘΕ͍ͯΔ͔Λ
    ೺Ѳ͢Δඞཁ͕͋Δ

    View Slide

  41. CVJMEσΟϨΫτϦ
    w CVJMENBQQJOHZNM
    w JNQPTNͰΠϯϙʔτ͢ΔͨΊʹར༻
    w CVJMEPQFONBQUJMFTUNTPVSDFEBUBZNM
    w UJMFMJWFDPQZͰ1PTU(*4ΛUNTPVSDFͱͯ͠ೝࣝ͢Δ
    ͨΊͷઃఆ
    w CVJMEUJMFTFUTRM
    w 1PTU(*4ͰQSFQSPDFTTJOHʹར༻

    View Slide

  42. 0QFO.BQ5JMFTͷఆٛ
    w ͲͷϨΠϠʔ͕͋Δ͔͸PQFONBQUJMFTZBNMͰఆٛ
    w ϨΠϠʔఆٛ͸શͯMBZFSTσΟϨΫτϦʹ഑ஔ
    w ϨΠϠʔ͸̎ͭͷZBNMͱͭҎ্ͷ42-ΛηοτͰѻ
    ͏ඞཁ͕͋Δ

    View Slide

  43. ྫMBZFSTCVJMEJOH
    w MBZFSTCVJMEJOHCVJMEJOHZBNM
    w ҎԼͷ42-΍NBQQJOHZNMͷࢀরٴͼUNTPVSDFͷͨΊͷ
    ઃఆͱυΩϡϝϯςʔγϣϯͷͨΊͷ৘ใΛهड़
    w MBZFSTCVJMEJOHCVJMEJOHTRM
    w 4DIFNBٴͼQSFQSPDFTTJOH ."5&3*"-7*&8
    ͷͨΊͷ42-
    w MBZFSTCVJMEJOHNBQQJOHZNM
    w JNQPTNͰΠϯϙʔτ͢ΔͨΊͷఆٛ

    View Slide

  44. औΓࠐΉཁૉ͕଍Γͳ͍৔߹
    w MBZFSTҎԼͷσΟϨΫτϦͰ֘౰͢ΔϨΠϠʔ͕͋Ε͹
    NBQQJOHZBNM΁௥Ճͱ42-Λ௥هΛ͢Ε͹Α͍
    w ֘౰͢ΔϨΠϠʔ͕ແ͚Ε͹৽نʹσΟϨΫτϦΛ࡞੒͠
    ͯࣗྗͰ࡞Δ

    View Slide

  45. 4DIFNB
    w 0QFO.BQ5JMFTͷ4DIFNB͸ϓϩάϥϜʹΑͬͯࣗಈ࡞੒
    ͞Ε͍ͯΔ
    w IUUQTPQFONBQUJMFTPSHTDIFNB
    w FUMEPDͱ͍͏هड़͸PQFONBQUJMFTUPPMTͰ(SBQIWJ[
    ʹΑΔ࡞ਤΛ͢ΔͨΊͷ΋ͷ
    w ্هαΠτͰ4IPX%JBHSBNTΛબ୒͢Δͱग़ͯདྷΔ

    View Slide

  46. RVJDLTUBSUTIͷઌ
    w %PDLFSͷΤίγεςϜ΁ͷཧղ͸ඞཁ
    w ֤λεΫɺ%PDLFS$PNQPTFʹΑΔಈ࡞Λ͍͍ͩͨ೺Ѳ
    ͔ͯ͠ΒɺΧελϚΠζ͢Δͷ͕ྑ͍
    w EPDLFSDPNQPTFDPOpHZNMͳͲ͸୯ମͰ࡞੒Մೳ
    w JNQPTNͷ࢖͍ํ͕೺ѲͰ͖Ε͹ࠩ෼Πϯϙʔτ΍QMBOFU
    ͷ࡞੒·Ͱ͍͚Δ͸ͣ
    w QHEBUB΍JNQPTNͷDBDIF͸EPDLFSʹ࢒ͬͯΔ
    w ·ͩͦ͜·Ͱ͸΍ͬͯͳ͍ )%%͕ͳ͍ͷͰ΍ͬͯͳ͍

    View Slide

  47. JNQPTNͷDBDIFΛࢀর
    $ docker volume ls
    DRIVER VOLUME NAME
    local openmaptiles_cache
    local openmaptiles_pgdata
    $ docker run -it -v openmaptiles_cache:/cache alpine /bin/sh
    / # ls /cache
    coords inserted_ways nodes relations ways
    / # du -h /cache
    22.4M /cache/coords
    248.0K /cache/relations
    24.0K /cache/inserted_ways
    2.2M /cache/nodes
    12.7M /cache/ways
    37.6M /cache

    View Slide

  48. νϡʔχϯά
    w UJMFTFSWFSHMͱ૊Έ߹ΘͤΔͳΒNCUJMFTܗࣜʹग़ྗ͕ඞ

    w σϑΥϧτͷUNTPVSDFͰ͸ύϑΥʔϚϯε͕༨Γग़ͳ
    ͍
    w $16ͷίΞΛ૿΍ͯ͠΋઀ଓ਺͕૿͑ͳ͍ͳͲ
    w QPTUTFSWFͳΒίΞ਺͕૿͑ͯ΋ରԠՄೳ
    w ىಈͨ͠෼͚ͩ઀ଓ਺͕૿͑Δ

    View Slide

  49. QPTUTFSWFWBSOJTI
    QPTUTFSWF
    QPTUTFSWF
    QPTUTFSWF
    WBSOJTIDBDIF
    1PSU
    1PSU
    1PSU
    UJMFMJWFDPQZ
    NCUJMFT

    View Slide

  50. ύϑΥʔϚϯε
    ؀ڥ
    ͘͞ΒΫϥ΢υ
    DPSF(#.FNPSZ
    ࣌ؒ
    HFOFSBUFWFDUPSUJMFT
    UJMFMJWFDPQZWJBUNTPVSDF

    I
    HFOFSBUFWFDUPSUJMFTGSPN
    QPTUTFSWF
    UJMFMJWFDPQZWJBIUUQ

    NJO

    View Slide

  51. νϡʔχϯάͷϙΠϯτ
    w .CUJMFTʹ͢Δ͔Ͳ͏͔Ͱ൑அͨ͠ํ͕ྑ͍
    w UJMFTFSWFSHMʹґଘ͠ͳ͚Ε͹WBSOJTIΛ௨ͯ͠௚઀
    QPTUTFSWFͰ഑৴͢Δͱ͍͏ख͕͋Δ
    w νϡʔχϯά͸1PTUHSF42-ଆ΋ඞཁ
    w EPDLFSDPNQPTFZNMΛฤूͯ͠QPTUHSFTRMDPOGΛ
    ಡΈࠐ·ͤΔͳͲ

    View Slide

  52. ͋ͱ͸࣭໰ͳͲ

    View Slide