equationoftime 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.rspec +1 -0
- data/Gemfile +4 -0
- data/LICENSE.md +22 -0
- data/LICENSE.txt +22 -0
- data/README.md +80 -0
- data/README2.txt +70 -0
- data/Rakefile +80 -0
- data/doc/GeoLatLng.html +770 -0
- data/doc/_index.html +123 -0
- data/doc/class_list.html +54 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +179 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +179 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +178 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +611 -0
- data/doc/top-level-namespace.html +112 -0
- data/equationoftime.gemspec +35 -0
- data/examples/Equation_of_Time.jpg +0 -0
- data/examples/analemma_data_generator.rb +53 -0
- data/examples/check_date_type.rb +57 -0
- data/examples/compare_geoc_long_ra.rb +31 -0
- data/examples/data_table.rb +26 -0
- data/examples/earth_rotation.rb +13 -0
- data/examples/eot_methods_list.rb +16 -0
- data/examples/eot_plot.r +57 -0
- data/examples/eot_suntimes.rb +140 -0
- data/examples/equation_of_time.py +186 -0
- data/examples/figure_1.jpg +0 -0
- data/examples/file_converter.rb +31 -0
- data/examples/from_readme.rb +10 -0
- data/examples/geo_locator.rb +12 -0
- data/examples/getjd.rb +45 -0
- data/examples/input_suntimes.rb +21 -0
- data/examples/julian_day_formula.rb +29 -0
- data/examples/julian_day_formula.txt +12 -0
- data/examples/my_time_conversion.rb +21 -0
- data/examples/nutation_series.txt +678 -0
- data/examples/nutation_series.yaml +14239 -0
- data/examples/nutation_table5_3a.txt +682 -0
- data/examples/nutation_table5_3a.yaml +9532 -0
- data/examples/ptime.rb +162 -0
- data/examples/read_nutation_data.rb +399 -0
- data/examples/suntimes.rb +28 -0
- data/examples/suntimes_test.rb +47 -0
- data/examples/test_poly_eval.rb +38 -0
- data/examples/time_scales.rb +29 -0
- data/examples/usage_example.rb +13 -0
- data/examples/use_angles.rb +155 -0
- data/lib/eot/angles.rb +337 -0
- data/lib/eot/constants.rb +168 -0
- data/lib/eot/displays.rb +213 -0
- data/lib/eot/geo_lat_lng_smt.rb +80 -0
- data/lib/eot/init.rb +93 -0
- data/lib/eot/nutation.rb +70 -0
- data/lib/eot/nutation_table5_3a.yaml +9532 -0
- data/lib/eot/times.rb +130 -0
- data/lib/eot/utilities.rb +129 -0
- data/lib/eot/version.rb +6 -0
- data/lib/eot.rb +11 -0
- data/tests/minitest/aliased_angles_spec.rb +287 -0
- data/tests/minitest/aliased_displays_spec.rb +106 -0
- data/tests/minitest/aliased_times_spec.rb +36 -0
- data/tests/minitest/aliased_utilities_spec.rb +49 -0
- data/tests/minitest/angles_spec.rb +313 -0
- data/tests/minitest/constants_spec.rb +27 -0
- data/tests/minitest/delta_epsilon_spec.rb +35 -0
- data/tests/minitest/displays_spec.rb +111 -0
- data/tests/minitest/geo_spec.rb +36 -0
- data/tests/minitest/init_spec.rb +32 -0
- data/tests/minitest/nutation_spec.rb +33 -0
- data/tests/minitest/times_spec.rb +137 -0
- data/tests/minitest/utilities_spec.rb +121 -0
- data/tests/spec_config.rb +3 -0
- data/wiki.md +46 -0
- data/wiki2.md +4 -0
- metadata +240 -0
data/doc/GeoLatLng.html
ADDED
@@ -0,0 +1,770 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: GeoLatLng
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.4
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '';
|
20
|
+
framesUrl = "frames.html#!GeoLatLng.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="_index.html">Index (G)</a> »
|
35
|
+
|
36
|
+
|
37
|
+
<span class="title">GeoLatLng</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: GeoLatLng
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">GeoLatLng</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/eot/geo_lat_lng_smt.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>class for location lookup in geo_lat_lng_smt.rb</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
118
|
+
<ul class="summary">
|
119
|
+
|
120
|
+
<li class="public ">
|
121
|
+
<span class="summary_signature">
|
122
|
+
|
123
|
+
<a href="#addr-instance_method" title="#addr (instance method)">- (Object) <strong>addr</strong> </a>
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
</span>
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
<span class="summary_desc"><div class='inline'>
|
141
|
+
<p>Address entered.</p>
|
142
|
+
</div></span>
|
143
|
+
|
144
|
+
</li>
|
145
|
+
|
146
|
+
|
147
|
+
<li class="public ">
|
148
|
+
<span class="summary_signature">
|
149
|
+
|
150
|
+
<a href="#base-instance_method" title="#base (instance method)">- (Object) <strong>base</strong> </a>
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
</span>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
<span class="note title readonly">readonly</span>
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
<span class="summary_desc"><div class='inline'>
|
170
|
+
<p>Base Google URL.</p>
|
171
|
+
</div></span>
|
172
|
+
|
173
|
+
</li>
|
174
|
+
|
175
|
+
|
176
|
+
<li class="public ">
|
177
|
+
<span class="summary_signature">
|
178
|
+
|
179
|
+
<a href="#default_int-instance_method" title="#default_int (instance method)">- (Object) <strong>default_int</strong> </a>
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
</span>
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
<span class="note title readonly">readonly</span>
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
<span class="summary_desc"><div class='inline'>
|
199
|
+
<p>Default International set to GMT Museum.</p>
|
200
|
+
</div></span>
|
201
|
+
|
202
|
+
</li>
|
203
|
+
|
204
|
+
|
205
|
+
<li class="public ">
|
206
|
+
<span class="summary_signature">
|
207
|
+
|
208
|
+
<a href="#default_us-instance_method" title="#default_us (instance method)">- (Object) <strong>default_us</strong> </a>
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
</span>
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
<span class="note title readonly">readonly</span>
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
<span class="summary_desc"><div class='inline'>
|
228
|
+
<p>Default US set to PARCS.</p>
|
229
|
+
</div></span>
|
230
|
+
|
231
|
+
</li>
|
232
|
+
|
233
|
+
|
234
|
+
<li class="public ">
|
235
|
+
<span class="summary_signature">
|
236
|
+
|
237
|
+
<a href="#lat-instance_method" title="#lat (instance method)">- (Object) <strong>lat</strong> </a>
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
</span>
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
<span class="summary_desc"><div class='inline'>
|
255
|
+
<p>Latitude returned.</p>
|
256
|
+
</div></span>
|
257
|
+
|
258
|
+
</li>
|
259
|
+
|
260
|
+
|
261
|
+
<li class="public ">
|
262
|
+
<span class="summary_signature">
|
263
|
+
|
264
|
+
<a href="#lng-instance_method" title="#lng (instance method)">- (Object) <strong>lng</strong> </a>
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
</span>
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
<span class="summary_desc"><div class='inline'>
|
282
|
+
<p>Longitude returned.</p>
|
283
|
+
</div></span>
|
284
|
+
|
285
|
+
</li>
|
286
|
+
|
287
|
+
|
288
|
+
</ul>
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
<h2>
|
295
|
+
Instance Method Summary
|
296
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
297
|
+
</h2>
|
298
|
+
|
299
|
+
<ul class="summary">
|
300
|
+
|
301
|
+
<li class="public ">
|
302
|
+
<span class="summary_signature">
|
303
|
+
|
304
|
+
<a href="#get_coordinates_from_address-instance_method" title="#get_coordinates_from_address (instance method)">- (Object) <strong>get_coordinates_from_address</strong> </a>
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
</span>
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
<span class="summary_desc"><div class='inline'>
|
319
|
+
<p>coordinates lookup.</p>
|
320
|
+
</div></span>
|
321
|
+
|
322
|
+
</li>
|
323
|
+
|
324
|
+
|
325
|
+
<li class="public ">
|
326
|
+
<span class="summary_signature">
|
327
|
+
|
328
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (GeoLatLng) <strong>initialize</strong> </a>
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
</span>
|
333
|
+
|
334
|
+
|
335
|
+
<span class="note title constructor">constructor</span>
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
<span class="summary_desc"><div class='inline'>
|
345
|
+
<p>Instance variables.</p>
|
346
|
+
</div></span>
|
347
|
+
|
348
|
+
</li>
|
349
|
+
|
350
|
+
|
351
|
+
</ul>
|
352
|
+
|
353
|
+
|
354
|
+
<div id="constructor_details" class="method_details_list">
|
355
|
+
<h2>Constructor Details</h2>
|
356
|
+
|
357
|
+
<div class="method_details first">
|
358
|
+
<h3 class="signature first" id="initialize-instance_method">
|
359
|
+
|
360
|
+
- (<tt><span class='object_link'><a href="" title="GeoLatLng (class)">GeoLatLng</a></span></tt>) <strong>initialize</strong>
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
</h3><div class="docstring">
|
367
|
+
<div class="discussion">
|
368
|
+
|
369
|
+
<p>Instance variables</p>
|
370
|
+
|
371
|
+
|
372
|
+
</div>
|
373
|
+
</div>
|
374
|
+
<div class="tags">
|
375
|
+
|
376
|
+
|
377
|
+
</div><table class="source_code">
|
378
|
+
<tr>
|
379
|
+
<td>
|
380
|
+
<pre class="lines">
|
381
|
+
|
382
|
+
|
383
|
+
32
|
384
|
+
33
|
385
|
+
34
|
386
|
+
35
|
387
|
+
36
|
388
|
+
37
|
389
|
+
38
|
390
|
+
39
|
391
|
+
40
|
392
|
+
41</pre>
|
393
|
+
</td>
|
394
|
+
<td>
|
395
|
+
<pre class="code"><span class="info file"># File 'lib/eot/geo_lat_lng_smt.rb', line 32</span>
|
396
|
+
|
397
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
398
|
+
|
399
|
+
<span class='ivar'>@base</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>http://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address=</span><span class='tstring_end'>"</span></span>
|
400
|
+
<span class='ivar'>@default_us</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>3333 Coyote Hill Road, Palo Alto, CA, 94304, USA</span><span class='tstring_end'>"</span></span><span class='comment'>#do you copy? :D
|
401
|
+
</span> <span class='ivar'>@default_int</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Blackheath Ave, London SE10 8XJ, UK</span><span class='tstring_end'>"</span></span>
|
402
|
+
<span class='ivar'>@lat</span> <span class='op'>=</span> <span class='float'>0.0</span>
|
403
|
+
<span class='ivar'>@lng</span> <span class='op'>=</span> <span class='float'>0.0</span>
|
404
|
+
<span class='const'>MultiXml</span><span class='period'>.</span><span class='id identifier rubyid_parser'>parser</span> <span class='op'>=</span> <span class='symbol'>:rexml</span><span class='comment'>#:libxml#:ox # :nokogiri
|
405
|
+
</span>
|
406
|
+
<span class='kw'>end</span></pre>
|
407
|
+
</td>
|
408
|
+
</tr>
|
409
|
+
</table>
|
410
|
+
</div>
|
411
|
+
|
412
|
+
</div>
|
413
|
+
|
414
|
+
<div id="instance_attr_details" class="attr_details">
|
415
|
+
<h2>Instance Attribute Details</h2>
|
416
|
+
|
417
|
+
|
418
|
+
<span id="addr=-instance_method"></span>
|
419
|
+
<div class="method_details first">
|
420
|
+
<h3 class="signature first" id="addr-instance_method">
|
421
|
+
|
422
|
+
- (<tt>Object</tt>) <strong>addr</strong>
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
</h3><div class="docstring">
|
429
|
+
<div class="discussion">
|
430
|
+
|
431
|
+
<p>Address entered</p>
|
432
|
+
|
433
|
+
|
434
|
+
</div>
|
435
|
+
</div>
|
436
|
+
<div class="tags">
|
437
|
+
|
438
|
+
|
439
|
+
</div><table class="source_code">
|
440
|
+
<tr>
|
441
|
+
<td>
|
442
|
+
<pre class="lines">
|
443
|
+
|
444
|
+
|
445
|
+
20
|
446
|
+
21
|
447
|
+
22</pre>
|
448
|
+
</td>
|
449
|
+
<td>
|
450
|
+
<pre class="code"><span class="info file"># File 'lib/eot/geo_lat_lng_smt.rb', line 20</span>
|
451
|
+
|
452
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_addr'>addr</span>
|
453
|
+
<span class='ivar'>@addr</span>
|
454
|
+
<span class='kw'>end</span></pre>
|
455
|
+
</td>
|
456
|
+
</tr>
|
457
|
+
</table>
|
458
|
+
</div>
|
459
|
+
|
460
|
+
|
461
|
+
<span id=""></span>
|
462
|
+
<div class="method_details ">
|
463
|
+
<h3 class="signature " id="base-instance_method">
|
464
|
+
|
465
|
+
- (<tt>Object</tt>) <strong>base</strong> <span class="extras">(readonly)</span>
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
|
471
|
+
</h3><div class="docstring">
|
472
|
+
<div class="discussion">
|
473
|
+
|
474
|
+
<p>Base Google URL</p>
|
475
|
+
|
476
|
+
|
477
|
+
</div>
|
478
|
+
</div>
|
479
|
+
<div class="tags">
|
480
|
+
|
481
|
+
|
482
|
+
</div><table class="source_code">
|
483
|
+
<tr>
|
484
|
+
<td>
|
485
|
+
<pre class="lines">
|
486
|
+
|
487
|
+
|
488
|
+
11
|
489
|
+
12
|
490
|
+
13</pre>
|
491
|
+
</td>
|
492
|
+
<td>
|
493
|
+
<pre class="code"><span class="info file"># File 'lib/eot/geo_lat_lng_smt.rb', line 11</span>
|
494
|
+
|
495
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_base'>base</span>
|
496
|
+
<span class='ivar'>@base</span>
|
497
|
+
<span class='kw'>end</span></pre>
|
498
|
+
</td>
|
499
|
+
</tr>
|
500
|
+
</table>
|
501
|
+
</div>
|
502
|
+
|
503
|
+
|
504
|
+
<span id=""></span>
|
505
|
+
<div class="method_details ">
|
506
|
+
<h3 class="signature " id="default_int-instance_method">
|
507
|
+
|
508
|
+
- (<tt>Object</tt>) <strong>default_int</strong> <span class="extras">(readonly)</span>
|
509
|
+
|
510
|
+
|
511
|
+
|
512
|
+
|
513
|
+
|
514
|
+
</h3><div class="docstring">
|
515
|
+
<div class="discussion">
|
516
|
+
|
517
|
+
<p>Default International set to GMT Museum</p>
|
518
|
+
|
519
|
+
|
520
|
+
</div>
|
521
|
+
</div>
|
522
|
+
<div class="tags">
|
523
|
+
|
524
|
+
|
525
|
+
</div><table class="source_code">
|
526
|
+
<tr>
|
527
|
+
<td>
|
528
|
+
<pre class="lines">
|
529
|
+
|
530
|
+
|
531
|
+
17
|
532
|
+
18
|
533
|
+
19</pre>
|
534
|
+
</td>
|
535
|
+
<td>
|
536
|
+
<pre class="code"><span class="info file"># File 'lib/eot/geo_lat_lng_smt.rb', line 17</span>
|
537
|
+
|
538
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_default_int'>default_int</span>
|
539
|
+
<span class='ivar'>@default_int</span>
|
540
|
+
<span class='kw'>end</span></pre>
|
541
|
+
</td>
|
542
|
+
</tr>
|
543
|
+
</table>
|
544
|
+
</div>
|
545
|
+
|
546
|
+
|
547
|
+
<span id=""></span>
|
548
|
+
<div class="method_details ">
|
549
|
+
<h3 class="signature " id="default_us-instance_method">
|
550
|
+
|
551
|
+
- (<tt>Object</tt>) <strong>default_us</strong> <span class="extras">(readonly)</span>
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
</h3><div class="docstring">
|
558
|
+
<div class="discussion">
|
559
|
+
|
560
|
+
<p>Default US set to PARCS</p>
|
561
|
+
|
562
|
+
|
563
|
+
</div>
|
564
|
+
</div>
|
565
|
+
<div class="tags">
|
566
|
+
|
567
|
+
|
568
|
+
</div><table class="source_code">
|
569
|
+
<tr>
|
570
|
+
<td>
|
571
|
+
<pre class="lines">
|
572
|
+
|
573
|
+
|
574
|
+
14
|
575
|
+
15
|
576
|
+
16</pre>
|
577
|
+
</td>
|
578
|
+
<td>
|
579
|
+
<pre class="code"><span class="info file"># File 'lib/eot/geo_lat_lng_smt.rb', line 14</span>
|
580
|
+
|
581
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_default_us'>default_us</span>
|
582
|
+
<span class='ivar'>@default_us</span>
|
583
|
+
<span class='kw'>end</span></pre>
|
584
|
+
</td>
|
585
|
+
</tr>
|
586
|
+
</table>
|
587
|
+
</div>
|
588
|
+
|
589
|
+
|
590
|
+
<span id="lat=-instance_method"></span>
|
591
|
+
<div class="method_details ">
|
592
|
+
<h3 class="signature " id="lat-instance_method">
|
593
|
+
|
594
|
+
- (<tt>Object</tt>) <strong>lat</strong>
|
595
|
+
|
596
|
+
|
597
|
+
|
598
|
+
|
599
|
+
|
600
|
+
</h3><div class="docstring">
|
601
|
+
<div class="discussion">
|
602
|
+
|
603
|
+
<p>Latitude returned</p>
|
604
|
+
|
605
|
+
|
606
|
+
</div>
|
607
|
+
</div>
|
608
|
+
<div class="tags">
|
609
|
+
|
610
|
+
|
611
|
+
</div><table class="source_code">
|
612
|
+
<tr>
|
613
|
+
<td>
|
614
|
+
<pre class="lines">
|
615
|
+
|
616
|
+
|
617
|
+
23
|
618
|
+
24
|
619
|
+
25</pre>
|
620
|
+
</td>
|
621
|
+
<td>
|
622
|
+
<pre class="code"><span class="info file"># File 'lib/eot/geo_lat_lng_smt.rb', line 23</span>
|
623
|
+
|
624
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_lat'>lat</span>
|
625
|
+
<span class='ivar'>@lat</span>
|
626
|
+
<span class='kw'>end</span></pre>
|
627
|
+
</td>
|
628
|
+
</tr>
|
629
|
+
</table>
|
630
|
+
</div>
|
631
|
+
|
632
|
+
|
633
|
+
<span id="lng=-instance_method"></span>
|
634
|
+
<div class="method_details ">
|
635
|
+
<h3 class="signature " id="lng-instance_method">
|
636
|
+
|
637
|
+
- (<tt>Object</tt>) <strong>lng</strong>
|
638
|
+
|
639
|
+
|
640
|
+
|
641
|
+
|
642
|
+
|
643
|
+
</h3><div class="docstring">
|
644
|
+
<div class="discussion">
|
645
|
+
|
646
|
+
<p>Longitude returned</p>
|
647
|
+
|
648
|
+
|
649
|
+
</div>
|
650
|
+
</div>
|
651
|
+
<div class="tags">
|
652
|
+
|
653
|
+
|
654
|
+
</div><table class="source_code">
|
655
|
+
<tr>
|
656
|
+
<td>
|
657
|
+
<pre class="lines">
|
658
|
+
|
659
|
+
|
660
|
+
26
|
661
|
+
27
|
662
|
+
28</pre>
|
663
|
+
</td>
|
664
|
+
<td>
|
665
|
+
<pre class="code"><span class="info file"># File 'lib/eot/geo_lat_lng_smt.rb', line 26</span>
|
666
|
+
|
667
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_lng'>lng</span>
|
668
|
+
<span class='ivar'>@lng</span>
|
669
|
+
<span class='kw'>end</span></pre>
|
670
|
+
</td>
|
671
|
+
</tr>
|
672
|
+
</table>
|
673
|
+
</div>
|
674
|
+
|
675
|
+
</div>
|
676
|
+
|
677
|
+
|
678
|
+
<div id="instance_method_details" class="method_details_list">
|
679
|
+
<h2>Instance Method Details</h2>
|
680
|
+
|
681
|
+
|
682
|
+
<div class="method_details first">
|
683
|
+
<h3 class="signature first" id="get_coordinates_from_address-instance_method">
|
684
|
+
|
685
|
+
- (<tt>Object</tt>) <strong>get_coordinates_from_address</strong>
|
686
|
+
|
687
|
+
|
688
|
+
|
689
|
+
|
690
|
+
|
691
|
+
</h3><div class="docstring">
|
692
|
+
<div class="discussion">
|
693
|
+
|
694
|
+
<p>coordinates lookup</p>
|
695
|
+
|
696
|
+
|
697
|
+
</div>
|
698
|
+
</div>
|
699
|
+
<div class="tags">
|
700
|
+
|
701
|
+
|
702
|
+
</div><table class="source_code">
|
703
|
+
<tr>
|
704
|
+
<td>
|
705
|
+
<pre class="lines">
|
706
|
+
|
707
|
+
|
708
|
+
49
|
709
|
+
50
|
710
|
+
51
|
711
|
+
52
|
712
|
+
53
|
713
|
+
54
|
714
|
+
55
|
715
|
+
56
|
716
|
+
57
|
717
|
+
58
|
718
|
+
59
|
719
|
+
60
|
720
|
+
61
|
721
|
+
62
|
722
|
+
63
|
723
|
+
64
|
724
|
+
65
|
725
|
+
66
|
726
|
+
67
|
727
|
+
68
|
728
|
+
69</pre>
|
729
|
+
</td>
|
730
|
+
<td>
|
731
|
+
<pre class="code"><span class="info file"># File 'lib/eot/geo_lat_lng_smt.rb', line 49</span>
|
732
|
+
|
733
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_get_coordinates_from_address'>get_coordinates_from_address</span>
|
734
|
+
<span class='id identifier rubyid_res'>res</span> <span class='op'>=</span> <span class='const'>RestClient</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span>
|
735
|
+
<span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span>
|
736
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span> <span class='ivar'>@base</span> <span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span> <span class='ivar'>@addr</span> <span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
737
|
+
<span class='rparen'>)</span>
|
738
|
+
<span class='rparen'>)</span>
|
739
|
+
<span class='id identifier rubyid_parsed_res'>parsed_res</span> <span class='op'>=</span> <span class='const'>MultiXml</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span> <span class='id identifier rubyid_res'>res</span> <span class='rparen'>)</span>
|
740
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_parsed_res'>parsed_res</span><span class='lbracket'>[</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>GeocodeResponse</span><span class='tstring_end'>"</span></span> <span class='rbracket'>]</span><span class='lbracket'>[</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>result</span><span class='tstring_end'>"</span></span> <span class='rbracket'>]</span>
|
741
|
+
<span class='id identifier rubyid_status'>status</span> <span class='op'>=</span> <span class='id identifier rubyid_parsed_res'>parsed_res</span><span class='lbracket'>[</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>GeocodeResponse</span><span class='tstring_end'>"</span></span> <span class='rbracket'>]</span><span class='lbracket'>[</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>status</span><span class='tstring_end'>"</span></span> <span class='rbracket'>]</span>
|
742
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_status'>status</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>OK</span><span class='tstring_end'>"</span></span>
|
743
|
+
<span class='ivar'>@default</span>
|
744
|
+
<span class='kw'>else</span>
|
745
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span> <span class='op'>!=</span> <span class='int'>4</span>
|
746
|
+
<span class='ivar'>@default</span>
|
747
|
+
<span class='kw'>else</span>
|
748
|
+
<span class='ivar'>@lat</span> <span class='op'>=</span> <span class='id identifier rubyid_parsed_res'>parsed_res</span><span class='lbracket'>[</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>GeocodeResponse</span><span class='tstring_end'>"</span></span> <span class='rbracket'>]</span><span class='lbracket'>[</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>result</span><span class='tstring_end'>"</span></span> <span class='rbracket'>]</span><span class='lbracket'>[</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>geometry</span><span class='tstring_end'>"</span></span> <span class='rbracket'>]</span><span class='lbracket'>[</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>location</span><span class='tstring_end'>"</span></span> <span class='rbracket'>]</span><span class='lbracket'>[</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>lat</span><span class='tstring_end'>"</span></span> <span class='rbracket'>]</span>
|
749
|
+
<span class='ivar'>@lng</span> <span class='op'>=</span> <span class='id identifier rubyid_parsed_res'>parsed_res</span><span class='lbracket'>[</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>GeocodeResponse</span><span class='tstring_end'>"</span></span> <span class='rbracket'>]</span><span class='lbracket'>[</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>result</span><span class='tstring_end'>"</span></span> <span class='rbracket'>]</span><span class='lbracket'>[</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>geometry</span><span class='tstring_end'>"</span></span> <span class='rbracket'>]</span><span class='lbracket'>[</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>location</span><span class='tstring_end'>"</span></span> <span class='rbracket'>]</span><span class='lbracket'>[</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>lng</span><span class='tstring_end'>"</span></span> <span class='rbracket'>]</span>
|
750
|
+
<span class='kw'>end</span>
|
751
|
+
<span class='kw'>end</span>
|
752
|
+
|
753
|
+
<span class='kw'>end</span></pre>
|
754
|
+
</td>
|
755
|
+
</tr>
|
756
|
+
</table>
|
757
|
+
</div>
|
758
|
+
|
759
|
+
</div>
|
760
|
+
|
761
|
+
</div>
|
762
|
+
|
763
|
+
<div id="footer">
|
764
|
+
Generated on Wed Aug 20 13:59:12 2014 by
|
765
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
766
|
+
0.8.7.4 (ruby-2.1.2).
|
767
|
+
</div>
|
768
|
+
|
769
|
+
</body>
|
770
|
+
</html>
|