You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Spadez <ja...@hotmail.com> on 2012/07/29 00:54:09 UTC

Geocoding with Solr

Hi!

I am using Solr as my main search system for my site. Currently, I am using
google to turn a place name (such as a postcode or city) into a long / lat
co-ordinate. Then I am supplying this long / lat to Solr so it can perform a
spacial search.

I am really new to this, but I dont like my reliance on google for this. Is
it possible to import a database into Solr which linked both cities and
postcodes to a co-ordinate, and use Solr for this as well?





--
View this message in context: http://lucene.472066.n3.nabble.com/Geocoding-with-Solr-tp3997913.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Geocoding with Solr

Posted by "Mattmann, Chris A (388J)" <ch...@jpl.nasa.gov>.
Hi there,

You may want to check out:

SOLR-2073 Geonames.org UpdateProcessor for Spatial
SOLR-2074 GeoRSS ResponseWriter
SOLR-2075 SpatialQParserPlugin and HostIP adaptor
SOLR-2076 Spatial example schema updates
SOLR-2077 Spatial example solconfig updates
SOLR-2079 Expose HttpServletRequest object from SolrQueryRequest object
SOLR-2081 BaseResponseWriter isStreamingDocs causes SingleResponseWriter.end
to be called 2x
SOLR-2082 Geopost.jar for loading geonames data

My student and I submitted those issues a few years ago
to handle geocoding in Solr and I think it's still a pretty useful
approach.

Cheers,
Chris

On Jul 29, 2012, at 11:34 AM, Spadez wrote:

> If I wanted to return long/lat from either "town" "city" or "postcode", how
> would I structure it?
> 
> If I was just searching for towns it would be easy, like this:
> 
> 
>> *Town, City, Postcode, Country, Long/Lat*
>> Orpington, Kent, Uk, 1.2/1.1
>> 
> 
> However, but there will be "city" entries and "postcode", I dont how that
> would work, would the entry just be for a city for example:
> 
> 
> 
>> *Town, City, Postcode, Country, Long/Lat*
>> <null>, Kent, Uk, 1.2/1.1
>> 
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Geocoding-with-Solr-tp3997913p3997973.html
> Sent from the Solr - User mailing list archive at Nabble.com.


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Senior Computer Scientist
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 171-266B, Mailstop: 171-246
Email: chris.a.mattmann@nasa.gov
WWW:   http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Assistant Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Re: Geocoding with Solr

Posted by Spadez <ja...@hotmail.com>.
If I wanted to return long/lat from either "town" "city" or "postcode", how
would I structure it?

If I was just searching for towns it would be easy, like this:


> *Town, City, Postcode, Country, Long/Lat*
> Orpington, Kent, Uk, 1.2/1.1
> 

However, but there will be "city" entries and "postcode", I dont how that
would work, would the entry just be for a city for example:



> *Town, City, Postcode, Country, Long/Lat*
> <null>, Kent, Uk, 1.2/1.1
> 



--
View this message in context: http://lucene.472066.n3.nabble.com/Geocoding-with-Solr-tp3997913p3997973.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Geocoding with Solr

Posted by Paul Libbrecht <pa...@hoplahup.net>.
Spadez,

I've had some success into using the nicely open data of GeoNames.org but that was modestly only to fetch zip-code-to-town-name and long-lat associations, search for "postal-codes". 

It would be lovely that some more best practice examples are distributed on how to handle, e.g., the lon-lat uncertainty. 
I still do not know how I could take usefully advantage of a user-allowed-browser-geolocation which gives me lon/lat. I've seen article on how to do this with a YUI query thus far.

paul


Le 29 juil. 2012 à 00:54, Spadez a écrit :
> I am using Solr as my main search system for my site. Currently, I am using
> google to turn a place name (such as a postcode or city) into a long / lat
> co-ordinate. Then I am supplying this long / lat to Solr so it can perform a
> spacial search.
> 
> I am really new to this, but I dont like my reliance on google for this. Is
> it possible to import a database into Solr which linked both cities and
> postcodes to a co-ordinate, and use Solr for this as well?