Hex Artifact Content
Not logged in

Artifact d878394ec7da441eea5439ee8db6f96f4ea9bdb8:

Wiki page [GARS] by bradh 2013-01-07 09:50:50.
0000: 44 20 32 30 31 33 2d 30 31 2d 30 37 54 30 39 3a  D 2013-01-07T09:
0010: 35 30 3a 35 30 2e 35 33 38 0a 4c 20 47 41 52 53  50:50.538.L GARS
0020: 0a 50 20 33 63 36 32 32 66 63 37 66 64 64 66 35  .P 3c622fc7fddf5
0030: 34 63 63 66 32 32 32 31 33 61 30 32 35 32 62 37  4ccf22213a0252b7
0040: 31 35 62 36 34 38 66 38 33 33 30 0a 55 20 62 72  15b648f8330.U br
0050: 61 64 68 0a 57 20 31 33 38 35 0a 47 6c 6f 62 61  adh.W 1385.Globa
0060: 6c 20 41 72 65 61 20 52 65 66 65 72 65 6e 63 65  l Area Reference
0070: 20 53 79 73 74 65 6d 20 28 47 41 52 53 29 20 69   System (GARS) i
0080: 73 20 61 20 6e 6f 74 61 74 69 6f 6e 20 66 6f 72  s a notation for
0090: 20 64 65 73 63 72 69 62 69 6e 67 20 61 6e 20 61   describing an a
00a0: 72 65 61 2e 20 0d 0a 0d 0a 53 65 65 0d 0a 3c 61  rea. ....See..<a
00b0: 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 65 6e   href="http://en
00c0: 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77  .wikipedia.org/w
00d0: 69 6b 69 2f 47 6c 6f 62 61 6c 5f 41 72 65 61 5f  iki/Global_Area_
00e0: 52 65 66 65 72 65 6e 63 65 5f 53 79 73 74 65 6d  Reference_System
00f0: 22 3e 74 68 65 20 57 69 6b 69 70 65 64 69 61 20  ">the Wikipedia 
0100: 65 6e 74 72 79 20 66 6f 72 20 47 41 52 53 3c 2f  entry for GARS</
0110: 61 3e 20 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f  a> for more info
0120: 72 6d 61 74 69 6f 6e 20 6f 6e 20 68 6f 77 20 47  rmation on how G
0130: 41 52 53 20 69 73 20 75 73 65 64 20 74 6f 20 64  ARS is used to d
0140: 65 73 63 72 69 62 65 20 61 6e 20 61 72 65 61 2e  escribe an area.
0150: 0d 0a 0d 0a 53 70 61 74 69 61 4c 69 74 65 20 73  ....SpatiaLite s
0160: 75 70 70 6f 72 74 73 20 61 20 74 77 6f 20 6f 70  upports a two op
0170: 65 72 61 74 69 6f 6e 73 20 6f 6e 20 47 41 52 53  erations on GARS
0180: 3a 0d 0a 54 6f 47 41 52 53 2c 20 77 68 69 63 68  :..ToGARS, which
0190: 20 74 61 6b 65 73 20 61 20 70 6f 69 6e 74 20 28   takes a point (
01a0: 67 65 6f 6d 65 74 72 79 20 62 6c 6f 62 29 20 61  geometry blob) a
01b0: 6e 64 20 72 65 74 75 72 6e 73 20 74 68 65 20 47  nd returns the G
01c0: 41 52 53 20 61 72 65 61 20 28 61 73 20 74 65 78  ARS area (as tex
01d0: 74 29 20 74 68 61 74 20 63 6f 6e 74 61 69 6e 73  t) that contains
01e0: 20 74 68 61 74 20 70 6f 69 6e 74 2e 0d 0a 47 41   that point...GA
01f0: 52 53 4d 62 72 2c 20 77 68 69 63 68 20 70 72 6f  RSMbr, which pro
0200: 76 69 64 65 73 20 74 68 65 20 62 6f 75 6e 64 69  vides the boundi
0210: 6e 67 20 72 65 63 74 61 6e 67 6c 65 20 74 68 61  ng rectangle tha
0220: 74 20 63 6f 72 72 65 73 70 6f 6e 64 73 20 74 6f  t corresponds to
0230: 20 61 20 47 41 52 53 20 61 72 65 61 2e 0d 0a 0d   a GARS area....
0240: 0a 4e 6f 74 65 20 74 68 61 74 20 79 6f 75 20 63  .Note that you c
0250: 61 6e 27 74 20 74 75 72 6e 20 61 20 47 41 52 53  an't turn a GARS
0260: 20 72 65 66 65 72 65 6e 63 65 20 62 61 63 6b 20   reference back 
0270: 69 6e 74 6f 20 61 20 70 6f 69 6e 74 20 28 6f 72  into a point (or
0280: 20 61 20 6c 69 6e 65 73 74 72 69 6e 67 29 20 2d   a linestring) -
0290: 20 69 74 20 69 6e 68 65 72 65 6e 74 6c 79 20 28   it inherently (
02a0: 61 6e 64 20 6f 6e 6c 79 29 20 72 65 70 72 65 73  and only) repres
02b0: 65 6e 74 73 20 61 6e 20 61 72 65 61 2e 0d 0a 0d  ents an area....
02c0: 0a 3c 70 72 65 3e 0d 0a 73 70 61 74 69 61 6c 69  .<pre>..spatiali
02d0: 74 65 3e 20 53 45 4c 45 43 54 20 54 6f 47 41 52  te> SELECT ToGAR
02e0: 53 28 4d 61 6b 65 50 6f 69 6e 74 28 31 31 2e 32  S(MakePoint(11.2
02f0: 35 2c 20 34 33 2e 37 36 29 29 3b 0d 0a 33 38 33  5, 43.76));..383
0300: 4d 44 32 37 0d 0a 73 70 61 74 69 61 6c 69 74 65  MD27..spatialite
0310: 3e 20 53 45 4c 45 43 54 20 41 73 54 65 78 74 28  > SELECT AsText(
0320: 47 41 52 53 4d 62 72 28 22 33 38 33 4d 44 32 37  GARSMbr("383MD27
0330: 22 29 29 3b 0d 0a 50 4f 4c 59 47 4f 4e 28 28 31  "));..POLYGON((1
0340: 31 2e 32 35 20 34 33 2e 37 35 2c 20 31 31 2e 33  1.25 43.75, 11.3
0350: 33 33 33 33 33 20 34 33 2e 37 35 2c 20 31 31 2e  33333 43.75, 11.
0360: 33 33 33 33 33 33 20 34 33 2e 38 33 33 33 33 33  333333 43.833333
0370: 2c 20 31 31 2e 32 35 20 34 33 2e 38 33 33 33 33  , 11.25 43.83333
0380: 33 2c 20 31 31 2e 32 35 20 34 33 2e 37 35 29 29  3, 11.25 43.75))
0390: 20 0d 0a 3c 2f 70 72 65 3e 0d 0a 0d 0a 46 6f 72   ..</pre>....For
03a0: 20 74 68 65 20 70 75 72 70 6f 73 65 73 20 6f 66   the purposes of
03b0: 20 54 6f 47 41 52 53 2c 20 61 20 70 6f 69 6e 74   ToGARS, a point
03c0: 20 74 68 61 74 20 6c 69 65 73 20 6f 6e 20 74 68   that lies on th
03d0: 65 20 6c 69 6e 65 20 74 68 61 74 20 64 69 76 69  e line that divi
03e0: 64 65 73 20 74 77 6f 20 61 72 65 61 73 20 69 73  des two areas is
03f0: 20 63 6f 6e 73 69 64 65 72 65 64 20 74 6f 20 62   considered to b
0400: 65 20 69 6e 20 74 68 65 20 61 72 65 61 20 74 6f  e in the area to
0410: 20 74 68 65 20 6e 6f 72 74 68 20 6f 72 20 65 61   the north or ea
0420: 73 74 2e 20 41 6e 6f 74 68 65 72 20 77 61 79 20  st. Another way 
0430: 74 6f 20 74 68 69 6e 6b 20 61 62 6f 75 74 20 74  to think about t
0440: 68 69 73 20 69 73 20 74 68 61 74 20 74 68 65 20  his is that the 
0450: 57 65 73 74 20 61 6e 64 20 53 6f 75 74 68 20 62  West and South b
0460: 6f 75 6e 64 61 72 69 65 73 20 6f 66 20 61 20 47  oundaries of a G
0470: 41 52 53 20 61 72 65 61 20 61 72 65 20 69 6e 63  ARS area are inc
0480: 6c 75 73 69 76 65 2c 20 61 6e 64 20 74 68 65 20  lusive, and the 
0490: 45 61 73 74 20 61 6e 64 20 4e 6f 72 74 68 20 62  East and North b
04a0: 6f 75 6e 64 61 72 69 65 73 20 61 72 65 20 6e 6f  oundaries are no
04b0: 6e 2d 69 6e 63 6c 75 73 69 76 65 2e 0d 0a 0d 0a  n-inclusive.....
04c0: 47 41 52 53 4d 62 72 20 77 6f 72 6b 73 20 6f 6e  GARSMbr works on
04d0: 20 35 20 28 33 30 20 6d 69 6e 75 74 65 20 62 79   5 (30 minute by
04e0: 20 33 30 20 6d 69 6e 75 74 65 20 63 65 6c 6c 73   30 minute cells
04f0: 29 2c 20 36 20 28 31 35 20 6d 69 6e 75 74 65 20  ), 6 (15 minute 
0500: 62 79 20 31 35 20 6d 69 6e 75 74 65 20 73 65 67  by 15 minute seg
0510: 6d 65 6e 74 73 20 77 69 74 68 20 63 65 6c 6c 73  ments with cells
0520: 29 20 61 6e 64 20 37 20 28 35 20 6d 69 6e 75 74  ) and 7 (5 minut
0530: 65 20 62 79 20 35 20 6d 69 6e 75 74 65 20 6b 65  e by 5 minute ke
0540: 79 70 61 64 73 29 20 61 6c 70 68 61 6e 75 6d 65  ypads) alphanume
0550: 72 69 63 20 72 65 66 65 72 65 6e 63 65 73 2e 20  ric references. 
0560: 54 68 65 20 73 69 7a 65 20 6f 66 20 74 68 65 20  The size of the 
0570: 62 6f 75 6e 64 61 72 79 20 72 65 63 74 61 6e 67  boundary rectang
0580: 6c 65 20 6a 75 73 74 20 72 65 66 6c 65 63 74 73  le just reflects
0590: 20 74 68 65 20 73 69 7a 65 20 6f 66 20 74 68 65   the size of the
05a0: 20 61 72 65 61 20 28 63 65 6c 6c 2c 20 73 65 67   area (cell, seg
05b0: 6d 65 6e 74 20 6f 72 20 6b 65 79 70 61 64 29 2e  ment or keypad).
05c0: 0d 0a 0d 0a 0a 5a 20 38 62 39 37 31 30 30 39 34  .....Z 8b9710094
05d0: 34 33 39 30 37 38 33 39 30 37 36 35 31 63 35 35  4390783907651c55
05e0: 66 62 33 36 32 32 61 0a                          fb3622a.