File: geo_in_rectangle.rst

package info (click to toggle)
groonga 15.0.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 163,080 kB
  • sloc: ansic: 770,564; cpp: 48,925; ruby: 40,447; javascript: 10,250; yacc: 7,045; sh: 5,602; python: 2,821; makefile: 1,672
file content (53 lines) | stat: -rw-r--r-- 1,337 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.. -*- rst -*-

geo_in_rectangle
================

名前
----

geo_in_rectangle - 座標が矩形の範囲内に存在するかどうかを調べます。

書式
----
::

 geo_in_rectangle(point, top_left, bottom_right)

説明
----

Groonga組込関数の一つであるgeo_in_rectangleについて説明します。組込関数は、script形式のgrn_expr中で呼び出すことができます。

geo_in_rectangle() 関数は、pointに指定した座標が、top_leftとbottom_rightがなす矩形の範囲内にあるかどうかを調べます。

引数
----

``point``

  矩形の範囲内に存在するかどうかを調べる座標を指定します。Point型の値を指定できます。 [#]_

``top_left``

  矩形の左上隅となる座標を指定します。Point型の値、あるいは座標を示す文字列を指定できます。

``bottom_right``

  矩形の右下隅となる座標を指定します。Point型の値、あるいは座標を示す文字列を指定できます。

返値
----

pointに指定した座標が矩形の範囲内にあるかどうかをBool型の値で返します。

--
::

 geo_in_rectangle(pos, "150x100", "100x150")
 true

.. rubric:: 脚注

.. [#] TokyoGeoPoint(日本測地系座標)かWGS84GeoPoint(世界測地系座標)のいずれかを指定できます。