title: How to implement Spatial(Geo-Location) searching in Grails?
body: <p>I am working on Grails 1.3.2 with MySql. I need to store the latitude and longitude of certain locations in the database and then on the basis of the user's current location, I need to return the items that are within a particular radius of that location.
  So, we basically have the following requirements:</p>
  
  <ol>
  <li>Search for places with-in a given radius of the user's current co-ordinates</li>
  <li>Provide a full text search. We are currently using searchable for this</li>
  <li>Do a combination of full text search with-in a given radius of the user's current co-ordinates.</li>
  </ol>
  
  <p>I have been looking into the various options that we have here and wanted to know what are your views/ suggestions to implement this. The various options that we have here are:</p>
  
  <ol>
  <li><p>Lucene Spatial Search (<a href="http://wiki.apache.org/lucene-java/SpatialSearch" rel="nofollow noreferrer">http://wiki.apache.org/lucene-java/SpatialSearch</a>) and look into how to use it with searchable</p></li>
  <li><p>Grails Solr Plugin (<a href="http://www.grails.org/plugin/solr" rel="nofollow noreferrer">http://www.grails.org/plugin/solr</a>). But this does not return domain objects.</p></li>
  <li><p>Grails Stitches Plugin (<a href="http://www.grails.org/plugin/stitches" rel="nofollow noreferrer">http://www.grails.org/plugin/stitches</a>). There is not a lot of documentation except on the author's site (<a href="http://www.philliprhodes.com/content/stitches-30-seconds" rel="nofollow noreferrer">http://www.philliprhodes.com/content/stitches-30-seconds</a>).</p></li>
  <li><p>MySql spatial extension along with a full text index on all the fields of the domain class. If we go this route, then we will not be using searchable at all.</p></li>
  <li>Postgres/PostGIS integration with hibernate-spatial (<a href="http://blog.mollusca.ch/2008/10/4/grails-spatial-data-postgis" rel="nofollow noreferrer">http://blog.mollusca.ch/2008/10/4/grails-spatial-data-postgis</a>)</li>
  </ol>
  
  <p>I believe that this is a very basic requirement in any application that integrates with maps.</p>
  
  <p>So, I am really interested in knowing the most appropriate way to implement this functionality.</p>
  
  <p>Thanks</p>