xref: /Lucene/lucene/spatial-extras/src/java/overview.html (revision 89db4950b9e2aee605d4313592466ad699ea7523)
1*89db4950Snknize<!--
2*89db4950Snknize Licensed to the Apache Software Foundation (ASF) under one or more
3*89db4950Snknize contributor license agreements.  See the NOTICE file distributed with
4*89db4950Snknize this work for additional information regarding copyright ownership.
5*89db4950Snknize The ASF licenses this file to You under the Apache License, Version 2.0
6*89db4950Snknize (the "License"); you may not use this file except in compliance with
7*89db4950Snknize the License.  You may obtain a copy of the License at
8*89db4950Snknize
9*89db4950Snknize     http://www.apache.org/licenses/LICENSE-2.0
10*89db4950Snknize
11*89db4950Snknize Unless required by applicable law or agreed to in writing, software
12*89db4950Snknize distributed under the License is distributed on an "AS IS" BASIS,
13*89db4950Snknize WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14*89db4950Snknize See the License for the specific language governing permissions and
15*89db4950Snknize limitations under the License.
16*89db4950Snknize-->
17*89db4950Snknize<html>
18*89db4950Snknize  <head>
19*89db4950Snknize    <title>Apache Lucene Spatial-Extras Module</title>
20*89db4950Snknize  </head>
21*89db4950Snknize  <body>
22*89db4950Snknize
23*89db4950Snknize  <h1>The Spatial-Extras Module for Apache Lucene</h1>
24*89db4950Snknize
25*89db4950Snknize  <p>
26*89db4950Snknize    The spatial-extras module, new to Lucene 6.5, is the new home for the original
27*89db4950Snknize    lucene <a href="../spatial/overview-summary.html">spatial</a> module.
28*89db4950Snknize    The principle interface to this module is a {@link org.apache.lucene.spatial.SpatialStrategy}
29*89db4950Snknize    which encapsulates an approach to indexing and searching
30*89db4950Snknize    based on shapes.  Different Strategies have different features and
31*89db4950Snknize    performance profiles, which are documented at each Strategy implementation
32*89db4950Snknize    class level.
33*89db4950Snknize  </p>
34*89db4950Snknize  <p>
35*89db4950Snknize    For some sample code showing how to use the API, see
36*89db4950Snknize      SpatialExample.java in the tests.
37*89db4950Snknize  </p>
38*89db4950Snknize<p>
39*89db4950Snknize    The spatial-extras module uses
40*89db4950Snknize    <a href="https://github.com/spatial4j/spatial4j">Spatial4j</a>
41*89db4950Snknize    heavily.  Spatial4j is an ASL licensed library with these capabilities:
42*89db4950Snknize    <ul>
43*89db4950Snknize    <li>Provides shape implementations, namely point, rectangle,
44*89db4950Snknize      and circle.  Both geospatial contexts and plain 2D Euclidean/Cartesian contexts
45*89db4950Snknize      are supported.
46*89db4950Snknize      With an additional dependency, it adds polygon and other geometry shape
47*89db4950Snknize      support via integration with
48*89db4950Snknize      <a href="http://sourceforge.net/projects/jts-topo-suite/">JTS Topology Suite</a>.
49*89db4950Snknize      This includes dateline wrap support.</li>
50*89db4950Snknize    <li>Shape parsing and serialization, including
51*89db4950Snknize      <a href="http://en.wikipedia.org/wiki/Well-known_text">Well-Known Text (WKT)</a>
52*89db4950Snknize      (via JTS).</li>
53*89db4950Snknize    <li>Distance and other spatial related math calculations.</li>
54*89db4950Snknize    </ul>
55*89db4950Snknize  </p>
56*89db4950Snknize  <p>
57*89db4950Snknize    Historical note: The new spatial-extras module was once known as
58*89db4950Snknize    Lucene Spatial Playground (LSP) as an external project.  In ~March 2012, LSP
59*89db4950Snknize    split into the spatial module as part of Lucene and Spatial4j externally. A
60*89db4950Snknize    large chunk of the LSP implementation originated as SOLR-2155 which uses
61*89db4950Snknize    trie/prefix-tree algorithms with a geohash encoding.  That approach is
62*89db4950Snknize    implemented in {@link org.apache.lucene.spatial.prefix.RecursivePrefixTreeStrategy}
63*89db4950Snknize    today.
64*89db4950Snknize  </p>
65*89db4950Snknize
66*89db4950Snknize  </body>
67*89db4950Snknize</html>