File: geolocation_search.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 (50 lines) | stat: -rw-r--r-- 1,438 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
.. -*- rst -*-

Geolocation search
==================

Groonga supports geolocation search. It uses index for
search. It means that you can search by geolocation fast
like fulltext search.

Supported features
------------------

Groonga supports only point as data type. Line, surface and
so on aren't supported yet. Here is a feature list:

#. Groonga can store a point to a column.
#. Groonga can search records that have a point in the specified rectangle.
#. Groonga can search records that have a point in the specified circle.
#. Groonga can calculate distance between two points.
#. Groonga can sort records by distance from the specified
   point in ascending order.

Here are use cases for Groonga's geolocation search:

* You list McDonald's around a station.
* You list KFC around the current location sort by distance
  from the current location in ascending order with distance.

Here are not use cases:

* You search McDonald's in a city. (Groonga doesn't support
  geolocation search by a shape except a rectangle and a
  circle.)
* You store a region instead of a point as a lake
  record. (A column can't has geolocation data except a
  point.)

The following figures show about Groonga's geolocation
search features.

Here is a figure that only has records. A black point
describes a record. The following figures shows how records
are treated.

.. image:: /images/geo-points.png
   :alt: only records


Coming soon...