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

GeoDjangoではじめる地理空間情報

 GeoDjangoではじめる地理空間情報

DjangoCongress JP 2018 https://djangocongress.jp
- 2018/05/19 (Sat)
- Cybozu Inc.

地図というと、GoogleMapを使って地図に施設のポイントを表示することが一般的ではありますが、近年は、Web GISというWebベースのGIS(地理空間情報)の表現方法が手軽に実装出来るようになってきました。
そこでWeb GIS入門として、様々な地理情報や位置情報の表現方法を、GeoDjangoとJavaScriptを使ってGISのポイントと事例紹介をしたいと思います。

#djangocongress

Hiroshi Omata

May 19, 2018
Tweet

More Decks by Hiroshi Omata

Other Decks in Programming

Transcript




  1. ) 50 ( 50 /88
    2 812 9

    View full-size slide

  2. Who am I
    / OMATA, Hiroshi
    • (/1&,(2$*)
    • DO:C@49L5JP=5R>NQ
    U
    HT<7DOE3KI?8
    SDOABNF
    • .2(% .2!+02)#-&"'&"
    M;6K
    • PythonDjangoJavaScriptG
    • Twitter: @homata
    • Facebook: op.homata

    View full-size slide



  3. ) P S IRy rp G Od eGh
    RF
    y c ) / O agWG i sw m MR

    • y rp Gh_ T l ) CA (: : C(:
    • ,. rpjt A C C : / C :
    • Oo n y y Gh_O ) :
    • y rp T l ) C:
    • bi_ ) C
    CC CD:CC A

    View full-size slide

  4. : :



    : / : . .
    : : :
    : .
    : :
    : :

    View full-size slide


  5. • *)
    • _
    • * 1 plwkpsm _
    • * /
    • u r
    • / / :/ ihg
    • _ _ _ j I h Seh G g
    c _b e g j OE
    • jc I a g _ gE
    • * - o ty
    • / 1 :/ - :_
    • o ty O
    • j f g j u rI u r j
    j g gE
    • ju r n r j O
    ( * - / :
    ( # 0 0 0 * -l .* -_ * -_ : o ty

    View full-size slide


  6. • *) a

    • * 1 m l tnr
    • * / a
    • s
    • a / / :/ jih
    • a k I i_ Sfi G _ h
    a c f h k OE
    • k I b _ h hE
    • * - pru
    • / 1 :/ - :
    • a pru O
    • k g_ _ h k sI s k _
    _ e k _ h hE
    • k s o w s k O
    ( * - / :
    ( # 0 0 0 * -m y .* - * - : pru a
    s

    View full-size slide


  7. w ni h ud tK
    WX Yt e u e u j c tK

    • j j e j j
    • d t O j i d ut

    • i nru K .-, J3-1 )J .-,
    • j JZj w ud K o lud tK
    eo ) ) r i s m utZ ih K
    20/ 0

    • j ( j w j j i t K


    • ( 4 e w K w J y 4
    • j w d tK j rh je udh
    • j e a J e h je p eh

    • ( e t w j i J4 e t
    • w i iTYt rj e4 e t
    • t i dJ j u w i eWt
    • ej J j J p i t hgw S J w t
    : D 8 G : 8 D : 8 D : :

    View full-size slide


  8. g o k d /
    • je
    • k h k
    • k h t s k
    • k h k
    • w
    • h r w
    • ih i w /
    a
    • h p : w /
    a
    . . h
    . . ih
    . . h

    View full-size slide

  9. / /2 . / . . 2/ /. //2 . 2 2 .

    View full-size slide



  10. T X 91 3 0

    • ,


    • U
    • M

    • )( M
    • 69 Z
    • Y
    • Z

    View full-size slide



  11. 3 =D 3=E :IA: ED EGIA C , II E =D =E :IA: EG . P h c g e
    e i h p teW
    2683S2 GE =:D 6=IGE = C 8 G = 3GE fW hn d raP P” P syR h ami P
    v i4DI=GD:IAED: / E A:IAED E> A 3: 6GE< =G S 36 “ dW
    2683 ( &) . 38 ( ”
    2683w u i R II = G= A IG EG
    8 4 yR 8 :IA: =>=G=D = 8 I=C 4<=DIA>A=G P yR wR u yR Of rayR
    2683e ramis lf dP g 8 4 lordW yR i s alimie PwR
    uiyR s a P 2683yR f d r f WieP 8 4 -2683yR f dnW
    8 4 2683 ( &) 2 83 ( &)

    View full-size slide





  12. 2 0 g an /0Ol W h j j
    mp g
    1.-3.
    g an
    mp g j j
    g an g j j
    /0 TEo iK g O /0k c W
    /0 GYkS GYTJW d P
    8 DDD : 8 : 64 4 8

    View full-size slide


  13. E 6 G 98 6 B : G lt


    ) 3/ ( ) )
    lt
    /BB: 9 06 E jkw i n p
    X
    g W45 X g Y M
    .1 / ) 397i n p s hmto
    W d /BB: 9 b W e X397 lt Y
    eW d a g d
    g W g p X
    Y Y X aP g X dbM
    /BB: 9g S W.1 / Y eW
    d .1 / rt eW :06
    eW d

    View full-size slide

  14. ( )
    )
    ( (
    ( )) )
    ( )) )
    ( ))
    ( ))
    (( )) (
    4 - 1 4. 2:. :2 6 95 ( ) ) (
    4 - 3 5 3 6 04 / 95:5045 4575 4 98
    ) )

    View full-size slide



  15. ( (
    )
    e e
    e n e e e e e
    uge me h e
    i e e e j e
    e e ue
    e w e t e e
    ue
    e ue e e
    e e u e e
    e e e sae
    e c e p e
    e e ude ze e
    e
    e
    e
    0::8 /91 /7 28 973 01312 6 28 0:54
    0::8 0 :.6 6. 28 :51
    l k o

    View full-size slide




  16. pekt
    • pekt Gi
    • T Gi
    • _ M K
    • E kH IEr H IE s H I
    P _F
    .0/ - 1
    rgi
    • mehtH I P T Gi
    • _
    • _
    • J_ Gi K_
    • mehtO K _F
    • uGtl b t KLE b t
    TS_ J_
    , 1 -
    GIS N _ Gi pekt Gi rgi GiMJ_F
    : A :D , Go , , :

    View full-size slide

  17. ( )
    • - mx b e SsR‒ - I J d Vi
    • - m ad b d Vid g b
    • f a r d Vi
    • d Vi n w d ViI b RE d Vi e h
    d ViIGRI lp I d Vi GRE
    • r d Vi
    • B j c V a d Vi
    • r d ViE - .r
    • t c -+ -I o
    • ed Vi
    • AAA 3 > <: 3 /> 3 3/> :<>3 / 3 3

    View full-size slide



  18. • ( 94 )7 476 ( ) eF aj T RG
    CJG
    • R T Rrh
    • b 7( ) 4 4 476
    • 7 7 76 7( )G C N O S
    • 7( )Gp f C FT R n
    • 7( )GT Rs o c i

    View full-size slide



  19. :LPQEOC ;6 329 31/6 : 95#
    :LPQ34
    ,# CNRGOCP :LPQ34 #
    7 ;6 329 31/6 # LQ 93 ALJMIG Q.
    IGJGQC DR AQGL IGQ #
    9O AIC 329 31/6 # 2 LQ PRMMLOQC #
    ;6GQC 329 31/6 : 95#
    M QG 6GQC
    #+# CNRGOCP M QG 6GQC #
    QQMP- LAP# ELMOL CAQ#ALJ C CS OCD AL QOG EGP G PQ II OCNRGOCJC QP
    LQC
    :LPQ34 GP OCALJJC C CA RPC GQ GP Q C JLPQ J QROC DC QROC OGA LMC PLROAC PM QG I Q PC#

    View full-size slide


  20. • . () : > > < < eaS
    < : )< In LN T
    • ( P cf TcE gE_
    • . / S p i N To t
    • . / S < < > M
    • cE gE_S( I Y
    • . ), ), ),( . ( , Ir QR
    • s QG p x T I Y
    • p hc _ ( SO

    View full-size slide



  21. OST7 e ytu A c b fihe
    9
    0 5953 A1RFB FO 6>;: SOMF FO TBCLF/
    0 5953 ROBEA E A1S F T ROBEA FOM 1 FOM ROBEA BMF 6>;: ROBES/
    u
    • A3O TB S # 1 2j b ie e olpm_i
    • A TFRSFDTS # 1c2 d a ie olpm_i
    • A STB DF 1c2ex jwgi
    • A1RFB qrnse jwgi
    .
    . • ITTPS. Q TB DOM FLLO A,) TFMS ED,D F FCF- ( BFF
    • ITTPS. G ES P EODS P SMB RFGFRF DF ITML
    • ITTP. DSF BRO BGGRD O P FLLO P SMB ( POST S ITML PBT BLA>FLBT O SI PSA:FBS RFMF TS
    1
    2
    1
    2
    A3O TB S
    A TFRSFDTS

    View full-size slide



  22. • 2 . 1 2 52. 20 1 5 21 5 2 5:
    • 1 . 2 0 1 5 5 1 0/

    View full-size slide


  23. • ., . CA GEJ , <> D C E
    • T cLms Lep lp . C wR O
    • p lp
    • GGD GE CF< C CE< < CF (
    • . ) . CFD G> G ) FGE G>C > E EJ
    • . C R O ./ pegLiLg bLohj p lp
    • pegP ndjr iLg p lp
    • GGD III <: CE< (
    • 4 * EGC EC G>C F > E EJ
    • t j a
    • p lp
    • GGD DEC CE< (
    . C D C E . CFD G> C : G>C GGDF III CF< C D
    iLg y S u

    View full-size slide



  24. Pa / / < e l tcpt O <2: / 2 > 2/ 2 >
    Ga
    2 /<> / / < Pa / / < tcpt Ga
    • .
    2 wj fn WS a O Ga Ga J
    a
    • . < <2: / 2 > A
    • y O a
    • h v
    • O o js W
    • . <> <2: / 2 >
    • <2: / 2 > o js W

    • Ga
    • <> 2/ 2 >
    • W mcvr .2 b La
    • .2 Ga O P Mi v Ia
    • tgc O a

    View full-size slide

  25. Mp t J L S
    • ) ( : :
    • wMs r wMs W
    • SP W j tk
    • : 1 / G D< . M e w
    • P c t M S w aPc

    ) ( A D D:
    • a J Mn S S wMs tx
    • M SP wMsW
    • p hM wMs Mp p 2, 0

    • wMs O S
    • ) ( : < :
    • S W 5
    • b
    • p m v
    • ) ( I
    • e lMo h ips t
    • M e w
    • i g e SP
    • L S
    ) (
    ( <>< A D D: <>< / (s

    View full-size slide





  26. • E D D E A 4 E
    • . 04 0- IJ L M
    • E D E42. E ,4 # /G42. # 0D # 42. 4 .
    E ## E A D # A# #D :# A D # E# AE # E E

    View full-size slide

  27. ) ( (
    T R ' =II D
    L
    <=> I $ L
    , $ / N$ P PU]
    $ N[PS]
    $
    M
    M
    ..
    $
    $

    View full-size slide

  28. ( ) (
    0 T P 2 F > $
    F >D $>< CF F >

    BC C M # > 5D F > F >M = > < C = $
    F >D $= C<$ C $>< CF F >
    = 3 > F > $7 > /
    ): 1 F > $4B 6C > F : B1
    ): ( 1 F > $4B 6C > F : B1(
    ): ) 1 F > $4B 6C > F : B1(
    ): 1 F > $4B 6C > F : B1(
    ): - 1 F > $4B 6C > F : B1
    F 1 F > $8 6C > C>1 .

    View full-size slide

  29. : <: . 2 32/ - 0 0 -32 2/ 0 3 2 . 32

    View full-size slide

  30. ( ( ) (
    _ b a bef
    dgc 864( #1 = 740 .
    N GM FD$N MF PNDB ##P C0 . SM JC C : )# - - $PGN 2M CD
    >G P P R M#FD D DC 4I FM MCDJ MCRJD B D DC MF PNDB $
    M CI FM$BM $F P$C NM MCDJP
    BJ PP 2M CD MCDJP$ MCDJ /
    ) 0 MCDJP$3G 5 DJC T JD F G0
    ) ( 0 MCDJP$3G 5 DJC T JD F G0(
    ) ) 0 MCDJP$3G 5 DJC T JD F G0(
    ) 0 MCDJP$3G 5 DJC T JD F G0(
    ) - 0 MCDJP$3G 5 DJC T JD F G0
    FDM 0 MCDJP$ MJ FM 5 DJC P C0 .

    View full-size slide

  31. ) ( ) ) (
    F '
    $ B NM . $
    G M L
    G B ' M ='B L'NM FL G M 4 B
    G P F 'G FL G M 1
    F fbTom_au ctr ilwd
    = G B 0
    ( (() ( (()
    ( ((* ( ((*
    ( (( ( ((
    ( ((, ( ((,
    ( ((- ( ((-
    B G 874:37
    fbTom_au
    = L 0 L' M ' =L M
    L' M ' L' M ' G F # M ( )- ), )-()()'L #
    #
    N O = L 0 N #
    FG 0 4 B 1 = L = G B M L G02 FL B0 L L #
    FG'L O LM M0 N O = L 0O = L #
    fbTom_au jThpTg vT ovdtr
    $ = G B
    sjum Tu fbTnm_au }
    $ M L G
    jTh y Y
    $ B
    fbTom_au eT {
    $ ( )- ), )-()()'L
    vT fbTom_au

    View full-size slide

  32. ( )
    1
    3 2 3 . 11
    3 ( ) 2 : 1 2 1
    3 ($) 1 3
    3 ( )

    View full-size slide

  33. 'G O ) = >
    A = > > A B = A = >
    A = = = > B A B A A A$ = > , < = >#
    = > B A B A A A$ = > ./ , = >#
    ' M) AA = > A < $
    A = > > A B = A = >
    A< A>B (
    = > $ = > B A

    View full-size slide



  34. 2= 4 6 6 2 6 B 6 2 6
    B =
    6 B 6
    6=4 = 6 2 6 6 = 6 3 64B B6 = ' ( S "
    (' ) 6 6B 6 6 6 = ' ( " "
    6 B = 2 6=4 ="
    OGN G JOGN ,6 0 .

    View full-size slide





  35. • - SO ( ( .
    • - 1 ) 1 I Q . 1 1 / 1 1 1 1

    • -] a e G . : :01
    • - eL . 1 / /
    • - d[ d[ ( . 1 /

    View full-size slide