Sophie

Sophie

distrib > Fedora > 18 > x86_64 > media > updates > by-pkgid > e450e7f3d6075c4a54de19e68d38177f > files > 289

groonga-doc-3.0.5-1.fc18.x86_64.rpm


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>8.11.2. geo_distance &mdash; groonga v3.0.5 documentation</title>
    
    <link rel="stylesheet" href="../../_static/groonga.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '3.0.5',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <link rel="shortcut icon" href="../../_static/favicon.ico"/>
    <link rel="top" title="groonga v3.0.5 documentation" href="../../index.html" />
    <link rel="up" title="8.11. Function" href="../function.html" />
    <link rel="next" title="8.11.3. geo_in_circle" href="geo_in_circle.html" />
    <link rel="prev" title="8.11.1. edit_distance" href="edit_distance.html" /> 
  </head>
  <body>
<div class="header">
  <h1 class="title">
    <a id="top-link" href="../../index.html">
      <span class="project">groonga</span>
      <span class="separator">-</span>
      <span class="description">An open-source fulltext search engine and column store.</span>
    </a>
  </h1>

  <div class="other-language-links">
    <ul>
      <li><a href="../../../../ja/html/reference/functions/geo_distance.html"><img src="../../_static/jp.png" alt="日本語">日本語版はこちら</a></li>
    </ul>
  </div>
</div>
  

    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="geo_in_circle.html" title="8.11.3. geo_in_circle"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="edit_distance.html" title="8.11.1. edit_distance"
             accesskey="P">previous</a> |</li>
        <li><a href="../../index.html">groonga v3.0.5 documentation</a> &raquo;</li>
          <li><a href="../../reference.html" >8. リファレンスマニュアル</a> &raquo;</li>
          <li><a href="../function.html" accesskey="U">8.11. Function</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="geo-distance">
<h1>8.11.2. geo_distance<a class="headerlink" href="#geo-distance" title="Permalink to this headline">¶</a></h1>
<div class="section" id="summary">
<h2>8.11.2.1. Summary<a class="headerlink" href="#summary" title="Permalink to this headline">¶</a></h2>
<p><tt class="docutils literal"><span class="pre">geo_distance</span></tt> calculates the value of distance between specified two points.</p>
</div>
<div class="section" id="syntax">
<h2>8.11.2.2. Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<p><tt class="docutils literal"><span class="pre">geo_distance</span></tt> requires two point.
The parameter <tt class="docutils literal"><span class="pre">approximate_type</span></tt> is optional:</p>
<div class="highlight-none"><div class="highlight"><pre>geo_distance(point1, point2)
geo_distance(point1, point2, approximate_type)
</pre></div>
</div>
<p>The default value of <tt class="docutils literal"><span class="pre">approximate_type</span></tt> is <tt class="docutils literal"><span class="pre">&quot;rectangle&quot;</span></tt>.
If you omit <tt class="docutils literal"><span class="pre">approximate_type</span></tt>, <tt class="docutils literal"><span class="pre">geo_distance</span></tt> calculates the value of
distance as if <tt class="docutils literal"><span class="pre">&quot;rectangle&quot;</span></tt> was specified.</p>
</div>
<div class="section" id="usage">
<h2>8.11.2.3. Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
<p><tt class="docutils literal"><span class="pre">geo_distance</span></tt> is one of the groonga builtin functions.</p>
<p>You can call a builtin function in <a class="reference internal" href="../grn_expr.html"><em>grn_expr</em></a></p>
<p><tt class="docutils literal"><span class="pre">geo_distance</span></tt> function calculates the value of distance (approximate value)
between the coordinate of <tt class="docutils literal"><span class="pre">point1</span></tt> and the coordinate of <tt class="docutils literal"><span class="pre">point2</span></tt>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">groonga provides three built in functions for calculating the value of distance.
There are <tt class="docutils literal"><span class="pre">geo_distance()</span></tt>, <tt class="docutils literal"><span class="pre">geo_distance2()</span></tt> and <tt class="docutils literal"><span class="pre">geo_distance3()</span></tt>.
The difference of them is the algorithm of calculating distance.
<tt class="docutils literal"><span class="pre">geo_distance2()</span></tt> and <tt class="docutils literal"><span class="pre">geo_distance3()</span></tt> were deprecated since version 1.2.9.
Use <tt class="docutils literal"><span class="pre">geo_distance(point1,</span> <span class="pre">point2,</span> <span class="pre">&quot;sphere&quot;)</span></tt> instead of <tt class="docutils literal"><span class="pre">geo_distance2(point1,</span> <span class="pre">point2)</span></tt>.
Use <tt class="docutils literal"><span class="pre">geo_distance(point1,</span> <span class="pre">point2,</span> <span class="pre">&quot;ellipsoid&quot;)</span></tt> instead of <tt class="docutils literal"><span class="pre">geo_distance3(point1,</span> <span class="pre">point2)</span></tt>.</p>
</div>
<p>Lets's learn about <tt class="docutils literal"><span class="pre">geo_distance</span></tt> usage with examples.
This section shows simple usages.</p>
<p>Here are two schema definition and sample data to show the difference according to the usage.
Those samples show how to calculate the value of distance between New York City and London.</p>
<ol class="arabic simple">
<li>Using the column value of location for calculating the distance (<tt class="docutils literal"><span class="pre">Cities</span></tt> table)</li>
<li>Using the explicitly specified coordinates for calculating the distance (<tt class="docutils literal"><span class="pre">Geo</span></tt> table)</li>
</ol>
<div class="section" id="using-the-column-value-of-location">
<h3>8.11.2.3.1. Using the column value of location<a class="headerlink" href="#using-the-column-value-of-location" title="Permalink to this headline">¶</a></h3>
<p>Here are a schema definition of <tt class="docutils literal"><span class="pre">Cities</span></tt> table and sample data to show usage.</p>
<div class="highlight-none"><div class="highlight"><pre>table_create Cities TABLE_HASH_KEY ShortText
column_create Cities location COLUMN_SCALAR WGS84GeoPoint
load --table Cities
[
  {
    &quot;_key&quot;, &quot;location&quot;
  },
  {
    &quot;New York City&quot;, &quot;146566000x-266422000&quot;,
  },
]
</pre></div>
</div>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>table_create Cities TABLE_HASH_KEY ShortText
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create Cities location COLUMN_SCALAR WGS84GeoPoint
# [[0, 1337566253.89858, 0.000355720520019531], true]
load --table Cities
[
  {
     &quot;_key&quot;, &quot;location&quot;
  },
  {
     &quot;New York City&quot;, &quot;146566000x-266422000&quot;,
  },
]
# [[0, 1337566253.89858, 0.000355720520019531], 1]
</pre></div>
</div>
<p>This execution example creates a table named <tt class="docutils literal"><span class="pre">Cities</span></tt> which has one column named <tt class="docutils literal"><span class="pre">location</span></tt>.
<tt class="docutils literal"><span class="pre">location</span></tt> column stores the value of coordinate.
The coordinate of Tokyo is stored as sample data.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Cities --output_columns _score --filter 1 --scorer &#39;_score = geo_distance(location, &quot;185428000x-461000&quot;, &quot;rectangle&quot;)&#39;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         1
#       ],
#       [
#         [
#           &quot;_score&quot;,
#           &quot;Int32&quot;
#         ]
#       ],
#       [
#         5715104
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>This sample shows that <tt class="docutils literal"><span class="pre">geo_distance</span></tt> use the value of <tt class="docutils literal"><span class="pre">location</span></tt> column
and the value of coordinate to calculate distance.</p>
<p>The value (&quot;185428000x-461000&quot;) passed to <tt class="docutils literal"><span class="pre">geo_distance</span></tt> as the second argument is
the coordinate of London.</p>
</div>
<div class="section" id="using-the-explicitly-specified-value-of-location">
<h3>8.11.2.3.2. Using the explicitly specified value of location<a class="headerlink" href="#using-the-explicitly-specified-value-of-location" title="Permalink to this headline">¶</a></h3>
<p>Here are a schema definition of <tt class="docutils literal"><span class="pre">Geo</span></tt> table and sample data to show usage.</p>
<div class="highlight-none"><div class="highlight"><pre>table_create Geo TABLE_HASH_KEY ShortText
column_create Geo distance COLUMN_SCALAR Int32
load --table Geo
[
  {
    &quot;_key&quot;: &quot;the record for geo_distance() result&quot;
  }
]
</pre></div>
</div>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>table_create Geo TABLE_HASH_KEY ShortText
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create Geo distance COLUMN_SCALAR Int32
# [[0, 1337566253.89858, 0.000355720520019531], true]
load --table Geo
[
  {
    &quot;_key&quot;: &quot;the record for geo_distance() result&quot;
  }
]
# [[0, 1337566253.89858, 0.000355720520019531], 1]
</pre></div>
</div>
<p>This execution example creates a table named <tt class="docutils literal"><span class="pre">Geo</span></tt> which has one column named <tt class="docutils literal"><span class="pre">distance</span></tt>.
<tt class="docutils literal"><span class="pre">distance</span></tt> column stores the value of distance.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Geo --output_columns distance --scorer &#39;distance = geo_distance(&quot;146566000x-266422000&quot;, &quot;185428000x-461000&quot;, &quot;rectangle&quot;)&#39;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         1
#       ],
#       [
#         [
#           &quot;distance&quot;,
#           &quot;Int32&quot;
#         ]
#       ],
#       [
#         5807750
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>This sample shows that <tt class="docutils literal"><span class="pre">geo_distance</span></tt> use the coordinate of London
and the coordinate of New York to calculate distance.</p>
</div>
</div>
<div class="section" id="parameters">
<h2>8.11.2.4. Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
<div class="section" id="required-parameter">
<h3>8.11.2.4.1. Required parameter<a class="headerlink" href="#required-parameter" title="Permalink to this headline">¶</a></h3>
<p>There are two required parameter, <tt class="docutils literal"><span class="pre">point1</span></tt> and <tt class="docutils literal"><span class="pre">point2</span></tt>.</p>
<div class="section" id="point1">
<h4>8.11.2.4.1.1. <tt class="docutils literal"><span class="pre">point1</span></tt><a class="headerlink" href="#point1" title="Permalink to this headline">¶</a></h4>
<p>It specifies the start point that
you want to calculate the value of distance between two points.</p>
<p>You can specify the value of GeoPoint type. <a class="footnote-reference" href="#id2" id="id1">[1]</a></p>
<p>See <a class="reference internal" href="../types.html"><em>データ型</em></a> about GeoPoint.</p>
</div>
<div class="section" id="point2">
<h4>8.11.2.4.1.2. <tt class="docutils literal"><span class="pre">point2</span></tt><a class="headerlink" href="#point2" title="Permalink to this headline">¶</a></h4>
<p>It specifies the end point that
you want to calculate the value of distance between two points.</p>
<p>You can specify the value of GeoPoint type or
the string indicating the coordinate.</p>
<p>See <a class="reference internal" href="../types.html"><em>データ型</em></a> about GeoPoint and the coordinate.</p>
</div>
</div>
<div class="section" id="optional-parameter">
<h3>8.11.2.4.2. Optional parameter<a class="headerlink" href="#optional-parameter" title="Permalink to this headline">¶</a></h3>
<p>There is a optional parameter, <tt class="docutils literal"><span class="pre">approximate_type</span></tt>.</p>
<div class="section" id="approximate-type">
<h4>8.11.2.4.2.1. <tt class="docutils literal"><span class="pre">approximate_type</span></tt><a class="headerlink" href="#approximate-type" title="Permalink to this headline">¶</a></h4>
<p>It specifies how to approximate the geographical features for calculating
the value of distance.</p>
<p>You can specify the value of <tt class="docutils literal"><span class="pre">approximate_type</span></tt> by one of the followings.</p>
<blockquote>
<div><ul class="simple">
<li><tt class="docutils literal"><span class="pre">rectangle</span></tt></li>
<li><tt class="docutils literal"><span class="pre">sphere</span></tt></li>
<li><tt class="docutils literal"><span class="pre">ellipsoid</span></tt></li>
</ul>
</div></blockquote>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">There is a limitation about <tt class="docutils literal"><span class="pre">geo_distance</span></tt>. <tt class="docutils literal"><span class="pre">geo_distance</span></tt> can not
calculate the value of distance between two points across meridian,
equator or the date line if you use <tt class="docutils literal"><span class="pre">sphere</span></tt> or <tt class="docutils literal"><span class="pre">ellipsoid</span></tt> as
approximate type. There is not such a limitation for <tt class="docutils literal"><span class="pre">rectangle</span></tt>.
This is temporary limitation according to the implementation of groonga,
but it will be fixed in the future release.</p>
</div>
<div class="section" id="rectangle">
<h5>8.11.2.4.2.1.1. <tt class="docutils literal"><span class="pre">rectangle</span></tt><a class="headerlink" href="#rectangle" title="Permalink to this headline">¶</a></h5>
<p>This parameter require to approximate the geographical features
by square approximation for calculating the distance.</p>
<p>Since the value of distance is calculated by simple formula,
you can calculate the value of distance fast.
But, the error of distance increases as it approaches the pole.</p>
<p>You can also specify <tt class="docutils literal"><span class="pre">rect</span></tt> as abbrev expression.</p>
<p>Here is a sample about calculating the value of distance with column value.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Cities --output_columns _score --filter 1 --scorer &#39;_score = geo_distance(location, &quot;185428000x-461000&quot;, &quot;rectangle&quot;)&#39;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         1
#       ],
#       [
#         [
#           &quot;_score&quot;,
#           &quot;Int32&quot;
#         ]
#       ],
#       [
#         5715104
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>Here is a sample about calculating the value of distance with explicitly specified point.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Geo --output_columns distance --scorer &#39;distance = geo_distance(&quot;146566000x-266422000&quot;, &quot;185428000x-461000&quot;, &quot;rectangle&quot;)&#39;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         1
#       ],
#       [
#         [
#           &quot;distance&quot;,
#           &quot;Int32&quot;
#         ]
#       ],
#       [
#         5807750
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>Here are samples about calculating the value of distance with explicitly specified point across meridian, equator, the date line.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Geo --output_columns distance --scorer &#39;distance = geo_distance(&quot;175904000x8464000&quot;, &quot;145508000x-13291000&quot;, &quot;rectangle&quot;)&#39;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         1
#       ],
#       [
#         [
#           &quot;distance&quot;,
#           &quot;Int32&quot;
#         ]
#       ],
#       [
#         1051293
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>This sample shows the value of distance across meridian.
The return value of <tt class="docutils literal"><span class="pre">geo_distance(&quot;175904000x8464000&quot;,</span> <span class="pre">&quot;145508000x-13291000&quot;,</span> <span class="pre">&quot;rectangle&quot;)</span></tt> is the value of distance from Paris, Flance to Madrid, Spain.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Geo --output_columns distance --scorer &#39;distance = geo_distance(&quot;146566000x-266422000&quot;, &quot;-56880000x-172310000&quot;, &quot;rectangle&quot;)&#39;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         1
#       ],
#       [
#         [
#           &quot;distance&quot;,
#           &quot;Int32&quot;
#         ]
#       ],
#       [
#         6880439
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>This sample shows the value of distance across equator.
The return value of <tt class="docutils literal"><span class="pre">geo_distance(&quot;146566000x-266422000&quot;,</span> <span class="pre">&quot;-56880000x-172310000&quot;,</span> <span class="pre">&quot;rectangle&quot;)</span></tt> is the value of distance from New York, The United Status to Brasillia, Brasil.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Geo --output_columns distance --scorer &#39;distance = geo_distance(&quot;143660000x419009000&quot;, &quot;135960000x-440760000&quot;, &quot;rectangle&quot;)&#39;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         1
#       ],
#       [
#         [
#           &quot;distance&quot;,
#           &quot;Int32&quot;
#         ]
#       ],
#       [
#         10475205
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>This sample shows the value of distance across the date line.
The return value of <tt class="docutils literal"><span class="pre">geo_distance(&quot;143660000x419009000&quot;,</span> <span class="pre">&quot;135960000x-440760000&quot;,</span> <span class="pre">&quot;rectangle&quot;)</span></tt> is the value of distance from Beijin, China to San Francisco, The United States.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><tt class="docutils literal"><span class="pre">geo_distance</span></tt> uses square approximation as default. If you omit <tt class="docutils literal"><span class="pre">approximate_type</span></tt>, <tt class="docutils literal"><span class="pre">geo_distance</span></tt> behaves like <tt class="docutils literal"><span class="pre">rectangle</span></tt> was specified.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><tt class="docutils literal"><span class="pre">geo_distance</span></tt> accepts the string indicating the coordinate as
the value of <tt class="docutils literal"><span class="pre">point1</span></tt> when the value of <tt class="docutils literal"><span class="pre">approximate_type</span></tt> is
<tt class="docutils literal"><span class="pre">&quot;rectangle&quot;</span></tt>.
If you specified the string indicating the coordinate as the value
of <tt class="docutils literal"><span class="pre">point1</span></tt> with <tt class="docutils literal"><span class="pre">sphere</span></tt> or <tt class="docutils literal"><span class="pre">ellipsoid</span></tt>, <tt class="docutils literal"><span class="pre">geo_distance</span></tt>
returns 0 as the value of distance.</p>
</div>
</div>
<div class="section" id="sphere">
<h5>8.11.2.4.2.1.2. <tt class="docutils literal"><span class="pre">sphere</span></tt><a class="headerlink" href="#sphere" title="Permalink to this headline">¶</a></h5>
<p>This parameter require to approximate the geographical features
by spherical approximation for calculating the distance.</p>
<p>It is slower than <tt class="docutils literal"><span class="pre">rectangle</span></tt>, but the error of distance becomes
smaller than <tt class="docutils literal"><span class="pre">rectangle</span></tt>.</p>
<p>You can also specify <tt class="docutils literal"><span class="pre">sphr</span></tt> as abbrev expression.</p>
<p>Here is a sample about calculating the value of distance with column value.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Cities --output_columns _score --filter 1 --scorer &#39;_score = geo_distance(location, &quot;185428000x-461000&quot;, &quot;sphere&quot;)&#39;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         1
#       ],
#       [
#         [
#           &quot;_score&quot;,
#           &quot;Int32&quot;
#         ]
#       ],
#       [
#         5715102
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
</div>
<div class="section" id="ellipsoid">
<h5>8.11.2.4.2.1.3. <tt class="docutils literal"><span class="pre">ellipsoid</span></tt><a class="headerlink" href="#ellipsoid" title="Permalink to this headline">¶</a></h5>
<p>This parameter require to approximate the geographical features
by ellipsoid approximation for calculating the distance.</p>
<p>It uses the calculation of distance by the formula of Hubeny.
It is slower than <tt class="docutils literal"><span class="pre">sphere</span></tt>, but the error of distance becomes
smaller than <tt class="docutils literal"><span class="pre">sphere</span></tt>.</p>
<p>You can also specify <tt class="docutils literal"><span class="pre">ellip</span></tt> as abbrev expression.</p>
<p>Here is a sample about calculating the value of distance with column value.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Cities --output_columns _score --filter 1 --scorer &#39;_score = geo_distance(location, &quot;185428000x-461000&quot;, &quot;ellipsoid&quot;)&#39;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         1
#       ],
#       [
#         [
#           &quot;_score&quot;,
#           &quot;Int32&quot;
#         ]
#       ],
#       [
#         5706263
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
</div>
</div>
</div>
</div>
<div class="section" id="return-value">
<h2>8.11.2.5. Return value<a class="headerlink" href="#return-value" title="Permalink to this headline">¶</a></h2>
<p><tt class="docutils literal"><span class="pre">geo_distance</span></tt> returns the value of distance in float type.
The unit of return value is meter.</p>
<p class="rubric">Footnote</p>
<table class="docutils footnote" frame="void" id="id2" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td>You can specify whether TokyoGeoPoint or WGS84GeoPoint.</td></tr>
</tbody>
</table>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">8.11.2. geo_distance</a><ul>
<li><a class="reference internal" href="#summary">8.11.2.1. Summary</a></li>
<li><a class="reference internal" href="#syntax">8.11.2.2. Syntax</a></li>
<li><a class="reference internal" href="#usage">8.11.2.3. Usage</a><ul>
<li><a class="reference internal" href="#using-the-column-value-of-location">8.11.2.3.1. Using the column value of location</a></li>
<li><a class="reference internal" href="#using-the-explicitly-specified-value-of-location">8.11.2.3.2. Using the explicitly specified value of location</a></li>
</ul>
</li>
<li><a class="reference internal" href="#parameters">8.11.2.4. Parameters</a><ul>
<li><a class="reference internal" href="#required-parameter">8.11.2.4.1. Required parameter</a><ul>
<li><a class="reference internal" href="#point1">8.11.2.4.1.1. <tt class="docutils literal"><span class="pre">point1</span></tt></a></li>
<li><a class="reference internal" href="#point2">8.11.2.4.1.2. <tt class="docutils literal"><span class="pre">point2</span></tt></a></li>
</ul>
</li>
<li><a class="reference internal" href="#optional-parameter">8.11.2.4.2. Optional parameter</a><ul>
<li><a class="reference internal" href="#approximate-type">8.11.2.4.2.1. <tt class="docutils literal"><span class="pre">approximate_type</span></tt></a><ul>
<li><a class="reference internal" href="#rectangle">8.11.2.4.2.1.1. <tt class="docutils literal"><span class="pre">rectangle</span></tt></a></li>
<li><a class="reference internal" href="#sphere">8.11.2.4.2.1.2. <tt class="docutils literal"><span class="pre">sphere</span></tt></a></li>
<li><a class="reference internal" href="#ellipsoid">8.11.2.4.2.1.3. <tt class="docutils literal"><span class="pre">ellipsoid</span></tt></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#return-value">8.11.2.5. Return value</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="edit_distance.html"
                        title="previous chapter">8.11.1. edit_distance</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="geo_in_circle.html"
                        title="next chapter">8.11.3. geo_in_circle</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../../_sources/reference/functions/geo_distance.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="geo_in_circle.html" title="8.11.3. geo_in_circle"
             >next</a> |</li>
        <li class="right" >
          <a href="edit_distance.html" title="8.11.1. edit_distance"
             >previous</a> |</li>
        <li><a href="../../index.html">groonga v3.0.5 documentation</a> &raquo;</li>
          <li><a href="../../reference.html" >8. リファレンスマニュアル</a> &raquo;</li>
          <li><a href="../function.html" >8.11. Function</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2009-2013, Brazil, Inc.
    </div>
  </body>
</html>