Hex Artifact Content
Not logged in

Artifact 3c622fc7fddf54ccf22213a0252b715b648f8330:

Wiki page [GARS] by bradh 2012-04-01 02:10:51.
0000: 44 20 32 30 31 32 2d 30 34 2d 30 31 54 30 32 3a  D 2012-04-01T02:
0010: 31 30 3a 35 31 2e 39 34 36 0a 4c 20 47 41 52 53  10:51.946.L GARS
0020: 0a 55 20 62 72 61 64 68 0a 57 20 31 33 37 38 0a  .U bradh.W 1378.
0030: 47 6c 6f 62 61 6c 20 41 72 65 61 20 52 65 66 65  Global Area Refe
0040: 72 65 6e 63 65 20 53 79 73 74 65 6d 20 28 47 41  rence System (GA
0050: 52 53 29 20 69 73 20 61 20 6e 6f 74 61 74 69 6f  RS) is a notatio
0060: 6e 20 66 6f 72 20 64 65 73 63 72 69 62 69 6e 67  n for describing
0070: 20 61 6e 20 61 72 65 61 2e 20 0d 0a 0d 0a 53 65   an area. ....Se
0080: 65 0d 0a 3c 61 20 68 72 65 66 3d 22 68 74 74 70  e..<a href="http
0090: 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e  ://en.wikipedia.
00a0: 6f 72 67 2f 77 69 6b 69 2f 47 6c 6f 62 61 6c 5f  org/wiki/Global_
00b0: 41 72 65 61 5f 52 65 66 65 72 65 6e 63 65 5f 53  Area_Reference_S
00c0: 79 73 74 65 6d 22 3e 74 68 65 20 57 69 6b 69 70  ystem">the Wikip
00d0: 65 64 69 61 20 65 6e 74 72 79 20 66 6f 72 20 47  edia entry for G
00e0: 41 52 53 3c 2f 61 3e 20 66 6f 72 20 6d 6f 72 65  ARS</a> for more
00f0: 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20   information on 
0100: 68 6f 77 20 47 41 52 53 20 69 73 20 75 73 65 64  how GARS is used
0110: 20 74 6f 20 64 65 73 63 72 69 62 65 20 61 6e 20   to describe an 
0120: 61 72 65 61 2e 0d 0a 0d 0a 53 70 61 74 69 61 6c  area.....Spatial
0130: 69 74 65 20 73 75 70 70 6f 72 74 73 20 61 20 63  ite supports a c
0140: 6f 75 70 6c 65 20 6f 66 20 6f 70 65 72 61 74 69  ouple of operati
0150: 6f 6e 73 20 6f 6e 20 47 41 52 53 3a 0d 0a 54 6f  ons on GARS:..To
0160: 47 41 52 53 2c 20 77 68 69 63 68 20 74 61 6b 65  GARS, which take
0170: 73 20 61 20 70 6f 69 6e 74 20 28 67 65 6f 6d 65  s a point (geome
0180: 74 72 79 20 62 6c 6f 62 29 20 61 6e 64 20 72 65  try blob) and re
0190: 74 75 72 6e 73 20 74 68 65 20 47 41 52 53 20 61  turns the GARS a
01a0: 72 65 61 20 28 61 73 20 74 65 78 74 29 20 74 68  rea (as text) th
01b0: 61 74 20 63 6f 6e 74 61 69 6e 73 20 74 68 61 74  at contains that
01c0: 20 70 6f 69 6e 74 2e 0d 0a 47 41 52 53 4d 62 72   point...GARSMbr
01d0: 2c 20 77 68 69 63 68 20 70 72 6f 76 69 64 65 73  , which provides
01e0: 20 74 68 65 20 62 6f 75 6e 64 69 6e 67 20 72 65   the bounding re
01f0: 63 74 61 6e 67 6c 65 20 74 68 61 74 20 63 6f 72  ctangle that cor
0200: 72 65 73 70 6f 6e 64 73 20 74 6f 20 61 20 47 41  responds to a GA
0210: 52 53 20 61 72 65 61 2e 0d 0a 0d 0a 4e 6f 74 65  RS area.....Note
0220: 20 74 68 61 74 20 79 6f 75 20 63 61 6e 27 74 20   that you can't 
0230: 74 75 72 6e 20 61 20 47 41 52 53 20 72 65 66 65  turn a GARS refe
0240: 72 65 6e 63 65 20 62 61 63 6b 20 69 6e 74 6f 20  rence back into 
0250: 61 20 70 6f 69 6e 74 20 28 6f 72 20 61 20 6c 69  a point (or a li
0260: 6e 65 73 74 72 69 6e 67 29 20 2d 20 69 74 20 69  nestring) - it i
0270: 6e 68 65 72 65 6e 74 6c 79 20 28 61 6e 64 20 6f  nherently (and o
0280: 6e 6c 79 29 20 72 65 70 72 65 73 65 6e 74 73 20  nly) represents 
0290: 61 6e 20 61 72 65 61 2e 0d 0a 0d 0a 3c 70 72 65  an area.....<pre
02a0: 3e 0d 0a 73 70 61 74 69 61 6c 69 74 65 3e 20 53  >..spatialite> S
02b0: 45 4c 45 43 54 20 54 6f 47 41 52 53 28 4d 61 6b  ELECT ToGARS(Mak
02c0: 65 50 6f 69 6e 74 28 31 31 2e 32 35 2c 20 34 33  ePoint(11.25, 43
02d0: 2e 37 36 29 29 3b 0d 0a 33 38 33 4d 44 32 37 0d  .76));..383MD27.
02e0: 0a 73 70 61 74 69 61 6c 69 74 65 3e 20 53 45 4c  .spatialite> SEL
02f0: 45 43 54 20 41 73 54 65 78 74 28 47 41 52 53 4d  ECT AsText(GARSM
0300: 62 72 28 22 33 38 33 4d 44 32 37 22 29 29 3b 0d  br("383MD27"));.
0310: 0a 50 4f 4c 59 47 4f 4e 28 28 31 31 2e 32 35 20  .POLYGON((11.25 
0320: 34 33 2e 37 35 2c 20 31 31 2e 33 33 33 33 33 33  43.75, 11.333333
0330: 20 34 33 2e 37 35 2c 20 31 31 2e 33 33 33 33 33   43.75, 11.33333
0340: 33 20 34 33 2e 38 33 33 33 33 33 2c 20 31 31 2e  3 43.833333, 11.
0350: 32 35 20 34 33 2e 38 33 33 33 33 33 2c 20 31 31  25 43.833333, 11
0360: 2e 32 35 20 34 33 2e 37 35 29 29 20 0d 0a 3c 2f  .25 43.75)) ..</
0370: 70 72 65 3e 0d 0a 0d 0a 46 6f 72 20 74 68 65 20  pre>....For the 
0380: 70 75 72 70 6f 73 65 73 20 6f 66 20 54 6f 47 41  purposes of ToGA
0390: 52 53 2c 20 61 20 70 6f 69 6e 74 20 74 68 61 74  RS, a point that
03a0: 20 6c 69 65 73 20 6f 6e 20 74 68 65 20 6c 69 6e   lies on the lin
03b0: 65 20 74 68 61 74 20 64 69 76 69 64 65 73 20 74  e that divides t
03c0: 77 6f 20 61 72 65 61 73 20 69 73 20 63 6f 6e 73  wo areas is cons
03d0: 69 64 65 72 65 64 20 74 6f 20 62 65 20 69 6e 20  idered to be in 
03e0: 74 68 65 20 61 72 65 61 20 74 6f 20 74 68 65 20  the area to the 
03f0: 6e 6f 72 74 68 20 6f 72 20 65 61 73 74 2e 20 41  north or east. A
0400: 6e 6f 74 68 65 72 20 77 61 79 20 74 6f 20 74 68  nother way to th
0410: 69 6e 6b 20 61 62 6f 75 74 20 74 68 69 73 20 69  ink about this i
0420: 73 20 74 68 61 74 20 74 68 65 20 57 65 73 74 20  s that the West 
0430: 61 6e 64 20 53 6f 75 74 68 20 62 6f 75 6e 64 61  and South bounda
0440: 72 69 65 73 20 6f 66 20 61 20 47 41 52 53 20 61  ries of a GARS a
0450: 72 65 61 20 61 72 65 20 69 6e 63 6c 75 73 69 76  rea are inclusiv
0460: 65 2c 20 61 6e 64 20 74 68 65 20 45 61 73 74 20  e, and the East 
0470: 61 6e 64 20 4e 6f 72 74 68 20 62 6f 75 6e 64 61  and North bounda
0480: 72 69 65 73 20 61 72 65 20 6e 6f 6e 2d 69 6e 63  ries are non-inc
0490: 6c 75 73 69 76 65 2e 0d 0a 0d 0a 47 41 52 53 4d  lusive.....GARSM
04a0: 62 72 20 77 6f 72 6b 73 20 6f 6e 20 35 20 28 33  br works on 5 (3
04b0: 30 20 6d 69 6e 75 74 65 20 62 79 20 33 30 20 6d  0 minute by 30 m
04c0: 69 6e 75 74 65 20 63 65 6c 6c 73 29 2c 20 36 20  inute cells), 6 
04d0: 28 31 35 20 6d 69 6e 75 74 65 20 62 79 20 31 35  (15 minute by 15
04e0: 20 6d 69 6e 75 74 65 20 73 65 67 6d 65 6e 74 73   minute segments
04f0: 20 77 69 74 68 20 63 65 6c 6c 73 29 20 61 6e 64   with cells) and
0500: 20 37 20 28 35 20 6d 69 6e 75 74 65 20 62 79 20   7 (5 minute by 
0510: 35 20 6d 69 6e 75 74 65 20 6b 65 79 70 61 64 73  5 minute keypads
0520: 29 20 72 65 66 65 72 65 6e 63 65 73 2e 20 54 68  ) references. Th
0530: 65 20 73 69 7a 65 20 6f 66 20 74 68 65 20 62 6f  e size of the bo
0540: 75 6e 64 61 72 79 20 72 65 63 74 61 6e 67 6c 65  undary rectangle
0550: 20 6a 75 73 74 20 72 65 66 6c 65 63 74 73 20 74   just reflects t
0560: 68 65 20 73 69 7a 65 20 6f 66 20 74 68 65 20 61  he size of the a
0570: 72 65 61 20 28 63 65 6c 6c 2c 20 73 65 67 6d 65  rea (cell, segme
0580: 6e 74 20 6f 72 20 6b 65 79 70 61 64 29 2e 0d 0a  nt or keypad)...
0590: 0d 0a 0a 5a 20 64 64 61 63 36 37 61 66 37 62 66  ...Z ddac67af7bf
05a0: 62 31 37 35 61 66 64 32 35 33 31 62 63 32 65 39  b175afd2531bc2e9
05b0: 63 34 31 39 31 0a                                c4191.