Sha256: 7c606a06cf98c2e59c9ab1a627d3a46519674a7ac766a9cfae35ebd2650ea583

Contents?: true

Size: 1.28 KB

Versions: 2

Compression:

Stored size: 1.28 KB

Contents

.. highlightlang:: none

geo_distance
============

名前
----

geo_distance - 指定した2点の距離を計算する

書式
----
::

 geo_distance(point1, point2)

説明
----

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

geo_distance() 関数は、point1に指定した座標とpoint2に指定した座標の間の距離(近似値)を求めます。
geo_distance()の他に、距離計算アルゴリズムの異なる、geo_distance2()、geo_distance3()が使用できます。それぞれ、長方形近似、球面近似、ヒュベニの距離計算式によって距離を算出します。

引数
----

``point1``

  距離を求める2点のうち一つを指定します。GeoPoint型の値を指定できます。 [#]_

``point2``

  距離を求める2点のうちもう一つを指定します。GeoPoint型の値、あるいは座標を示す文字列を指定できます。


返値
----

指定した2点の距離をFloat型の値(単位:メートル)として返します。

例
--
::

 geo_distance(pos, "150x150")
 100

.. rubric:: 脚注

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

Version data entries

2 entries across 1 versions & 1 rubygems

Version Path
rroonga-1.0.1-x86-mingw32 vendor/local/share/groonga/doc/ja/source/functions/geo_distance.txt
rroonga-1.0.1-x86-mingw32 vendor/local/share/groonga/doc/ja/html/_sources/functions/geo_distance.txt