simpler-tiles 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +17 -0
- data/Gemfile +2 -0
- data/LICENSE +19 -0
- data/README +22 -0
- data/Rakefile +71 -0
- data/doc/SimplerTiles/Bounds.html +506 -0
- data/doc/SimplerTiles/Layer.html +593 -0
- data/doc/SimplerTiles/Map.html +2081 -0
- data/doc/SimplerTiles/PP.html +204 -0
- data/doc/SimplerTiles/Query.html +521 -0
- data/doc/SimplerTiles/Style.html +577 -0
- data/doc/SimplerTiles.html +167 -0
- data/doc/_index.html +188 -0
- data/doc/class_list.html +47 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +55 -0
- data/doc/css/style.css +322 -0
- data/doc/file.README.html +89 -0
- data/doc/file_list.html +49 -0
- data/doc/frames.html +13 -0
- data/doc/index.html +89 -0
- data/doc/js/app.js +205 -0
- data/doc/js/full_list.js +173 -0
- data/doc/js/jquery.js +16 -0
- data/doc/method_list.html +390 -0
- data/doc/top-level-namespace.html +105 -0
- data/ext/simpler_tiles/bounds.c +90 -0
- data/ext/simpler_tiles/bounds.h +17 -0
- data/ext/simpler_tiles/depend +7 -0
- data/ext/simpler_tiles/extconf.rb +42 -0
- data/ext/simpler_tiles/layer.c +93 -0
- data/ext/simpler_tiles/layer.h +16 -0
- data/ext/simpler_tiles/map.c +338 -0
- data/ext/simpler_tiles/map.h +17 -0
- data/ext/simpler_tiles/query.c +87 -0
- data/ext/simpler_tiles/query.h +17 -0
- data/ext/simpler_tiles/simpler_tiles.c +16 -0
- data/ext/simpler_tiles/simpler_tiles.h +25 -0
- data/ext/simpler_tiles/style.c +106 -0
- data/ext/simpler_tiles/style.h +17 -0
- data/index.erb +459 -0
- data/index.html +439 -0
- data/lib/simpler_tiles/bounds.rb +19 -0
- data/lib/simpler_tiles/layer.rb +25 -0
- data/lib/simpler_tiles/map.rb +55 -0
- data/lib/simpler_tiles/mixins/pp.rb +13 -0
- data/lib/simpler_tiles/query.rb +28 -0
- data/lib/simpler_tiles/style.rb +19 -0
- data/lib/simpler_tiles/version.rb +4 -0
- data/lib/simpler_tiles.rb +13 -0
- data/simpler-tiles-logo.png +0 -0
- data/simpler-tiles.gemspec +30 -0
- data/test/helper.rb +8 -0
- data/test/test_map.rb +67 -0
- data/test/test_simpler_tiles.rb +26 -0
- metadata +199 -0
@@ -0,0 +1,521 @@
|
|
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: SimplerTiles::Query
|
8
|
+
|
9
|
+
— Documentation by YARD 0.7.5
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
relpath = '..';
|
19
|
+
if (relpath != '') relpath += '/';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
25
|
+
|
26
|
+
|
27
|
+
</head>
|
28
|
+
<body>
|
29
|
+
<script type="text/javascript" charset="utf-8">
|
30
|
+
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
+
</script>
|
32
|
+
|
33
|
+
<div id="header">
|
34
|
+
<div id="menu">
|
35
|
+
|
36
|
+
<a href="../_index.html">Index (Q)</a> »
|
37
|
+
<span class='title'><span class='object_link'><a href="../SimplerTiles.html" title="SimplerTiles (module)">SimplerTiles</a></span></span>
|
38
|
+
»
|
39
|
+
<span class="title">Query</span>
|
40
|
+
|
41
|
+
|
42
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<div id="search">
|
46
|
+
|
47
|
+
<a id="class_list_link" href="#">Class List</a>
|
48
|
+
|
49
|
+
<a id="method_list_link" href="#">Method List</a>
|
50
|
+
|
51
|
+
<a id="file_list_link" href="#">File List</a>
|
52
|
+
|
53
|
+
</div>
|
54
|
+
<div class="clear"></div>
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<iframe id="search_frame"></iframe>
|
58
|
+
|
59
|
+
<div id="content"><h1>Class: SimplerTiles::Query
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
</h1>
|
64
|
+
|
65
|
+
<dl class="box">
|
66
|
+
|
67
|
+
<dt class="r1">Inherits:</dt>
|
68
|
+
<dd class="r1">
|
69
|
+
<span class="inheritName">Object</span>
|
70
|
+
|
71
|
+
<ul class="fullTree">
|
72
|
+
<li>Object</li>
|
73
|
+
|
74
|
+
<li class="next">SimplerTiles::Query</li>
|
75
|
+
|
76
|
+
</ul>
|
77
|
+
<a href="#" class="inheritanceTree">show all</a>
|
78
|
+
|
79
|
+
</dd>
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
<dt class="r2">Includes:</dt>
|
87
|
+
<dd class="r2"><span class='object_link'><a href="PP.html" title="SimplerTiles::PP (module)">PP</a></span></dd>
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
<dt class="r1 last">Defined in:</dt>
|
94
|
+
<dd class="r1 last">lib/simpler_tiles/query.rb<span class="defines">,<br />
|
95
|
+
ext/simpler_tiles/query.c</span>
|
96
|
+
</dd>
|
97
|
+
|
98
|
+
</dl>
|
99
|
+
<div class="clear"></div>
|
100
|
+
|
101
|
+
<h2>Overview</h2><div class="docstring">
|
102
|
+
<div class="discussion">
|
103
|
+
<p>
|
104
|
+
A Query represents an OGR SQL query against a layer’s datasource.
|
105
|
+
Queries contain styles that are applied to each returned object from the
|
106
|
+
datastore.
|
107
|
+
</p>
|
108
|
+
|
109
|
+
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
<div class="tags">
|
113
|
+
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<h2>
|
124
|
+
Instance Method Summary
|
125
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
126
|
+
</h2>
|
127
|
+
|
128
|
+
<ul class="summary">
|
129
|
+
|
130
|
+
<li class="public ">
|
131
|
+
<span class="summary_signature">
|
132
|
+
|
133
|
+
<a href="#add_style-instance_method" title="#add_style (instance method)">- (Object) <strong>add_style</strong> </a>
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
</span>
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
147
|
+
|
148
|
+
</li>
|
149
|
+
|
150
|
+
|
151
|
+
<li class="public ">
|
152
|
+
<span class="summary_signature">
|
153
|
+
|
154
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Query) <strong>initialize</strong>(query) {|_self| ... }</a>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
</span>
|
159
|
+
|
160
|
+
<span class="note title constructor">constructor</span>
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
<span class="summary_desc"><div class='inline'><p>
|
170
|
+
Initialize a query with a string containing OGR SQL.
|
171
|
+
</p>
|
172
|
+
</div></span>
|
173
|
+
|
174
|
+
</li>
|
175
|
+
|
176
|
+
|
177
|
+
<li class="public ">
|
178
|
+
<span class="summary_signature">
|
179
|
+
|
180
|
+
<a href="#query-instance_method" title="#query (instance method)">- (String) <strong>query</strong> </a>
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
</span>
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
<span class="summary_desc"><div class='inline'><p>
|
194
|
+
Get the OGR SQL for this Query.
|
195
|
+
</p>
|
196
|
+
</div></span>
|
197
|
+
|
198
|
+
</li>
|
199
|
+
|
200
|
+
|
201
|
+
<li class="public ">
|
202
|
+
<span class="summary_signature">
|
203
|
+
|
204
|
+
<a href="#query%3D-instance_method" title="#query= (instance method)">- (String) <strong>query=</strong> </a>
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
</span>
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
<span class="summary_desc"><div class='inline'><p>
|
218
|
+
Set the OGR SQL for this Query.
|
219
|
+
</p>
|
220
|
+
</div></span>
|
221
|
+
|
222
|
+
</li>
|
223
|
+
|
224
|
+
|
225
|
+
<li class="public ">
|
226
|
+
<span class="summary_signature">
|
227
|
+
|
228
|
+
<a href="#styles-instance_method" title="#styles (instance method)">- (Object) <strong>styles</strong>(styles) </a>
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
</span>
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
<span class="summary_desc"><div class='inline'><p>
|
242
|
+
Styles will take a hash of style declarations and adds them to the internal
|
243
|
+
c list.
|
244
|
+
</p>
|
245
|
+
</div></span>
|
246
|
+
|
247
|
+
</li>
|
248
|
+
|
249
|
+
|
250
|
+
</ul>
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="PP.html" title="SimplerTiles::PP (module)">PP</a></span></h3>
|
262
|
+
<p class="inherited"><span class='object_link'><a href="PP.html#inspect-instance_method" title="SimplerTiles::PP#inspect (method)">#inspect</a></span></p>
|
263
|
+
<div id="constructor_details" class="method_details_list">
|
264
|
+
<h2>Constructor Details</h2>
|
265
|
+
|
266
|
+
<div class="method_details first">
|
267
|
+
<p class="signature first" id="initialize-instance_method">
|
268
|
+
|
269
|
+
- (<tt><span class='object_link'><a href="" title="SimplerTiles::Query (class)">Query</a></span></tt>) <strong>initialize</strong>(query) {|_self| ... }
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
</p><div class="docstring">
|
274
|
+
<div class="discussion">
|
275
|
+
<p>
|
276
|
+
Initialize a query with a string containing OGR SQL.
|
277
|
+
</p>
|
278
|
+
|
279
|
+
|
280
|
+
</div>
|
281
|
+
</div>
|
282
|
+
<div class="tags">
|
283
|
+
|
284
|
+
<h3>Yields:</h3>
|
285
|
+
<ul class="yield">
|
286
|
+
|
287
|
+
<li>
|
288
|
+
|
289
|
+
|
290
|
+
<span class='type'>(<tt>_self</tt>)</span>
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
</li>
|
295
|
+
|
296
|
+
</ul>
|
297
|
+
<h3>Yield Parameters:</h3>
|
298
|
+
<ul class="yieldparam">
|
299
|
+
|
300
|
+
<li>
|
301
|
+
|
302
|
+
<span class='name'>_self</span>
|
303
|
+
|
304
|
+
|
305
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="SimplerTiles::Query (class)">SimplerTiles::Query</a></span></tt>)</span>
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
—
|
310
|
+
<div class='inline'><p>
|
311
|
+
the object that the method was called on
|
312
|
+
</p>
|
313
|
+
</div>
|
314
|
+
|
315
|
+
</li>
|
316
|
+
|
317
|
+
</ul>
|
318
|
+
|
319
|
+
</div><table class="source_code">
|
320
|
+
<tr>
|
321
|
+
<td>
|
322
|
+
<pre class="lines">
|
323
|
+
|
324
|
+
|
325
|
+
8
|
326
|
+
9
|
327
|
+
10
|
328
|
+
11</pre>
|
329
|
+
</td>
|
330
|
+
<td>
|
331
|
+
<pre class="code"><span class="info file"># File 'lib/simpler_tiles/query.rb', line 8</span>
|
332
|
+
|
333
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_query identifier id'>query</span><span class='rparen token'>)</span>
|
334
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_query identifier id'>query</span> <span class='assign token'>=</span> <span class='rubyid_query identifier id'>query</span>
|
335
|
+
<span class='rubyid_yield yield kw'>yield</span> <span class='rubyid_self self kw'>self</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_block_given? fid id'>block_given?</span>
|
336
|
+
<span class='rubyid_end end kw'>end</span>
|
337
|
+
</pre>
|
338
|
+
</td>
|
339
|
+
</tr>
|
340
|
+
</table>
|
341
|
+
</div>
|
342
|
+
|
343
|
+
</div>
|
344
|
+
|
345
|
+
|
346
|
+
<div id="instance_method_details" class="method_details_list">
|
347
|
+
<h2>Instance Method Details</h2>
|
348
|
+
|
349
|
+
|
350
|
+
<div class="method_details first">
|
351
|
+
<p class="signature first" id="add_style-instance_method">
|
352
|
+
|
353
|
+
- (<tt>Object</tt>) <strong>add_style</strong>
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
</p>
|
358
|
+
</div>
|
359
|
+
|
360
|
+
<div class="method_details ">
|
361
|
+
<p class="signature " id="query-instance_method">
|
362
|
+
|
363
|
+
- (<tt>String</tt>) <strong>query</strong>
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
</p><div class="docstring">
|
368
|
+
<div class="discussion">
|
369
|
+
<p>
|
370
|
+
Get the OGR SQL for this Query.
|
371
|
+
</p>
|
372
|
+
|
373
|
+
|
374
|
+
</div>
|
375
|
+
</div>
|
376
|
+
<div class="tags">
|
377
|
+
|
378
|
+
<h3>Returns:</h3>
|
379
|
+
<ul class="return">
|
380
|
+
|
381
|
+
<li>
|
382
|
+
|
383
|
+
|
384
|
+
<span class='type'>(<tt>String</tt>)</span>
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
</li>
|
389
|
+
|
390
|
+
</ul>
|
391
|
+
|
392
|
+
</div><table class="source_code">
|
393
|
+
<tr>
|
394
|
+
<td>
|
395
|
+
<pre class="lines">
|
396
|
+
|
397
|
+
|
398
|
+
</pre>
|
399
|
+
</td>
|
400
|
+
<td>
|
401
|
+
<pre class="code"><span class="info file"># File 'ext/simpler_tiles/query.c'</span>
|
402
|
+
|
403
|
+
<span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
|
404
|
+
<span class='rubyid_get_sql identifier id'>get_sql</span><span class='lparen token'>(</span><span class='rubyid_VALUE constant id'>VALUE</span> <span class='rubyid_self self kw'>self</span><span class='rparen token'>)</span><span class='lbrace token'>{</span>
|
405
|
+
</pre>
|
406
|
+
</td>
|
407
|
+
</tr>
|
408
|
+
</table>
|
409
|
+
</div>
|
410
|
+
|
411
|
+
<div class="method_details ">
|
412
|
+
<p class="signature " id="query=-instance_method">
|
413
|
+
|
414
|
+
- (<tt>String</tt>) <strong>query=</strong>
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
</p><div class="docstring">
|
419
|
+
<div class="discussion">
|
420
|
+
<p>
|
421
|
+
Set the OGR SQL for this Query.
|
422
|
+
</p>
|
423
|
+
|
424
|
+
|
425
|
+
</div>
|
426
|
+
</div>
|
427
|
+
<div class="tags">
|
428
|
+
|
429
|
+
<h3>Returns:</h3>
|
430
|
+
<ul class="return">
|
431
|
+
|
432
|
+
<li>
|
433
|
+
|
434
|
+
|
435
|
+
<span class='type'>(<tt>String</tt>)</span>
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
</li>
|
440
|
+
|
441
|
+
</ul>
|
442
|
+
|
443
|
+
</div><table class="source_code">
|
444
|
+
<tr>
|
445
|
+
<td>
|
446
|
+
<pre class="lines">
|
447
|
+
|
448
|
+
|
449
|
+
</pre>
|
450
|
+
</td>
|
451
|
+
<td>
|
452
|
+
<pre class="code"><span class="info file"># File 'ext/simpler_tiles/query.c'</span>
|
453
|
+
|
454
|
+
<span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
|
455
|
+
<span class='rubyid_set_sql identifier id'>set_sql</span><span class='lparen token'>(</span><span class='rubyid_VALUE constant id'>VALUE</span> <span class='rubyid_self self kw'>self</span><span class='comma token'>,</span> <span class='rubyid_VALUE constant id'>VALUE</span> <span class='rubyid_query identifier id'>query</span><span class='rparen token'>)</span><span class='lbrace token'>{</span>
|
456
|
+
</pre>
|
457
|
+
</td>
|
458
|
+
</tr>
|
459
|
+
</table>
|
460
|
+
</div>
|
461
|
+
|
462
|
+
<div class="method_details ">
|
463
|
+
<p class="signature " id="styles-instance_method">
|
464
|
+
|
465
|
+
- (<tt>Object</tt>) <strong>styles</strong>(styles)
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
</p><div class="docstring">
|
470
|
+
<div class="discussion">
|
471
|
+
<p>
|
472
|
+
Styles will take a hash of style declarations and adds them to the internal
|
473
|
+
c list.
|
474
|
+
</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
|
+
15
|
489
|
+
16
|
490
|
+
17
|
491
|
+
18
|
492
|
+
19
|
493
|
+
20</pre>
|
494
|
+
</td>
|
495
|
+
<td>
|
496
|
+
<pre class="code"><span class="info file"># File 'lib/simpler_tiles/query.rb', line 15</span>
|
497
|
+
|
498
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_styles identifier id'>styles</span><span class='lparen token'>(</span><span class='rubyid_styles identifier id'>styles</span><span class='rparen token'>)</span>
|
499
|
+
<span class='rubyid_styles identifier id'>styles</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_k identifier id'>k</span><span class='comma token'>,</span><span class='rubyid_v identifier id'>v</span><span class='bitor op'>|</span>
|
500
|
+
<span class='rubyid_style identifier id'>style</span> <span class='assign token'>=</span> <span class='rubyid_SimplerTiles constant id'>SimplerTiles</span><span class='colon2 op'>::</span><span class='rubyid_Style constant id'>Style</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span> <span class='rubyid_k identifier id'>k</span><span class='comma token'>,</span> <span class='rubyid_v identifier id'>v</span>
|
501
|
+
<span class='rubyid_add_style identifier id'>add_style</span> <span class='rubyid_style identifier id'>style</span>
|
502
|
+
<span class='rubyid_end end kw'>end</span>
|
503
|
+
<span class='rubyid_end end kw'>end</span>
|
504
|
+
</pre>
|
505
|
+
</td>
|
506
|
+
</tr>
|
507
|
+
</table>
|
508
|
+
</div>
|
509
|
+
|
510
|
+
</div>
|
511
|
+
|
512
|
+
</div>
|
513
|
+
|
514
|
+
<div id="footer">
|
515
|
+
Generated on Wed Mar 7 20:33:23 2012 by
|
516
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
517
|
+
0.7.5 (ruby-1.8.7).
|
518
|
+
</div>
|
519
|
+
|
520
|
+
</body>
|
521
|
+
</html>
|