xref: /Lucene/lucene/spatial-extras/src/java/overview.html (revision 0d339043e378d8333c376bae89411b813de25b10)
189db4950Snknize<!--
289db4950Snknize Licensed to the Apache Software Foundation (ASF) under one or more
389db4950Snknize contributor license agreements.  See the NOTICE file distributed with
489db4950Snknize this work for additional information regarding copyright ownership.
589db4950Snknize The ASF licenses this file to You under the Apache License, Version 2.0
689db4950Snknize (the "License"); you may not use this file except in compliance with
789db4950Snknize the License.  You may obtain a copy of the License at
889db4950Snknize
989db4950Snknize     http://www.apache.org/licenses/LICENSE-2.0
1089db4950Snknize
1189db4950Snknize Unless required by applicable law or agreed to in writing, software
1289db4950Snknize distributed under the License is distributed on an "AS IS" BASIS,
1389db4950Snknize WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1489db4950Snknize See the License for the specific language governing permissions and
1589db4950Snknize limitations under the License.
1689db4950Snknize-->
1789db4950Snknize<html>
1889db4950Snknize  <head>
1989db4950Snknize    <title>Apache Lucene Spatial-Extras Module</title>
2089db4950Snknize  </head>
2189db4950Snknize  <body>
2289db4950Snknize
2389db4950Snknize  <h1>The Spatial-Extras Module for Apache Lucene</h1>
2489db4950Snknize
2589db4950Snknize  <p>
2689db4950Snknize    The spatial-extras module, new to Lucene 6.5, is the new home for the original
27*78655239SNicholas Knize    lucene spatial module.
2889db4950Snknize    The principle interface to this module is a {@link org.apache.lucene.spatial.SpatialStrategy}
2989db4950Snknize    which encapsulates an approach to indexing and searching
3089db4950Snknize    based on shapes.  Different Strategies have different features and
3189db4950Snknize    performance profiles, which are documented at each Strategy implementation
3289db4950Snknize    class level.
3389db4950Snknize  </p>
3489db4950Snknize  <p>
3589db4950Snknize    For some sample code showing how to use the API, see
3689db4950Snknize      SpatialExample.java in the tests.
3789db4950Snknize  </p>
3889db4950Snknize<p>
3989db4950Snknize    The spatial-extras module uses
4089db4950Snknize    <a href="https://github.com/spatial4j/spatial4j">Spatial4j</a>
4189db4950Snknize    heavily.  Spatial4j is an ASL licensed library with these capabilities:
4289db4950Snknize    <ul>
4389db4950Snknize    <li>Provides shape implementations, namely point, rectangle,
4489db4950Snknize      and circle.  Both geospatial contexts and plain 2D Euclidean/Cartesian contexts
4589db4950Snknize      are supported.
4689db4950Snknize      With an additional dependency, it adds polygon and other geometry shape
4789db4950Snknize      support via integration with
4889db4950Snknize      <a href="http://sourceforge.net/projects/jts-topo-suite/">JTS Topology Suite</a>.
4989db4950Snknize      This includes dateline wrap support.</li>
5089db4950Snknize    <li>Shape parsing and serialization, including
5189db4950Snknize      <a href="http://en.wikipedia.org/wiki/Well-known_text">Well-Known Text (WKT)</a>
5289db4950Snknize      (via JTS).</li>
5389db4950Snknize    <li>Distance and other spatial related math calculations.</li>
5489db4950Snknize    </ul>
5589db4950Snknize  <p>
5689db4950Snknize    Historical note: The new spatial-extras module was once known as
5789db4950Snknize    Lucene Spatial Playground (LSP) as an external project.  In ~March 2012, LSP
5889db4950Snknize    split into the spatial module as part of Lucene and Spatial4j externally. A
5989db4950Snknize    large chunk of the LSP implementation originated as SOLR-2155 which uses
6089db4950Snknize    trie/prefix-tree algorithms with a geohash encoding.  That approach is
6189db4950Snknize    implemented in {@link org.apache.lucene.spatial.prefix.RecursivePrefixTreeStrategy}
6289db4950Snknize    today.
6389db4950Snknize  </p>
6489db4950Snknize
6589db4950Snknize  </body>
6689db4950Snknize</html>
67