Sha256: 8feea61a9ace9af922d903a2076f679ca537c9484a58b808ad88ab9f5511e597

Contents?: true

Size: 1.29 KB

Versions: 12

Compression:

Stored size: 1.29 KB

Contents

.. -*- rst -*-

.. 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

12 entries across 4 versions & 1 rubygems

Version Path
rroonga-1.3.0-x86-mingw32 vendor/local/share/doc/groonga/source/functions/geo_distance.txt
rroonga-1.3.0-x86-mingw32 vendor/local/share/doc/groonga/en/html/_sources/functions/geo_distance.txt
rroonga-1.3.0-x86-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/functions/geo_distance.txt
rroonga-1.2.7-x86-mswin32 vendor/local/share/doc/groonga/source/functions/geo_distance.txt
rroonga-1.2.7-x86-mswin32 vendor/local/share/doc/groonga/ja/html/_sources/functions/geo_distance.txt
rroonga-1.2.7-x86-mswin32 vendor/local/share/doc/groonga/en/html/_sources/functions/geo_distance.txt
rroonga-1.2.7-x86-mingw32 vendor/local/share/doc/groonga/source/functions/geo_distance.txt
rroonga-1.2.7-x86-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/functions/geo_distance.txt
rroonga-1.2.7-x86-mingw32 vendor/local/share/doc/groonga/en/html/_sources/functions/geo_distance.txt
rroonga-1.2.5-x86-mingw32 vendor/local/share/doc/groonga/source/functions/geo_distance.txt
rroonga-1.2.5-x86-mingw32 vendor/local/share/doc/groonga/en/html/_sources/functions/geo_distance.txt
rroonga-1.2.5-x86-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/functions/geo_distance.txt