incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher O'Connell" <jwritec...@gmail.com>
Subject Re: ExternalJ Framework and Geospatial index
Date Tue, 10 Nov 2009 07:04:53 GMT
As requested, live data:

http://173.45.235.252/airport_data/_exj?action=near&latitude=32.15&longitude=-110.87
<= Airports near Tucson, AZ
http://173.45.235.252/airport_data/_exj?action=near&latitude=32.15&longitude=-110.87&count=2
<= fewer
http://173.45.235.252/airport_data/_exj?action=distance&latitude=32.15&longitude=-110.87&distance=20
<= By distance
http://173.45.235.252/airport_data/_exj?action=distance&latitude=32.15&longitude=-110.87&distance=200<=
Large distances are faster? That's a KDTree for you.
http://173.45.235.252/airport_data/_exj  <= general information
http://173.45.235.252/airport_data/_exj?action=info <= more advanced data.

Feel free to try any latitude an longitude in the US and some areas in
Canada and the Carribean are also populated. Airport's indicate airport
identifiers, you can look them up at http://data.flig.ht/ for names, etc
(just the 3 or 4 letter identifier). Also please note that the "distance"
function uses an uncached, unoptimized version of the haversive distance
formula, and so for small distances can take several hundred miliseconds.
This will be optimized soonish.

PLEASE don't visit action=index or action=rebuild, the currently running
version has a rebuild bug that I'm tracking down. Also, this is a dev server
so if it's not up, try again in a few minutes.

~ Christopher

P.S. The usual caveat, don't use this data for actual navigation, please
consult actual FAA publications. All data is from the FAADS August 27 cycle
(which means its out of date at the moment), not for navigation, your
mileage may vary, refrigerate after opening, serving suggestion, may cause
headaches, dizziness or death, consult a financial adviser before use, . . .

On Sun, Nov 8, 2009 at 11:34 PM, Christopher O'Connell <jwriteclub@gmail.com
> wrote:

> Unfortunately, CouchDB does not include geo-spatial indicies, and geoCouch
> requires a ton of dependancies, and is complicates. ExternalJ is a framework
> (sort of) to make writing external processes for CouchDB simpler. ExternalJ
> also comes with several useful applications, including a “geo” application
> which implements a geo-spatial index on a database. It's only dependency is
> java 1.5 (ExternalJ will compile against 1.4, but ExternalJ-Geo needs some
> of the concurrency structures in 1.5). It's fast a lightweight. At the
> moment, it keeps indicies in memory, but I'll be adding file storage soon.
>
> http://compu.terlicio.us/code/externalj/ To read about it and installation
> instructions
> http://svn.murderonvenus.com/externalj/ To get it
> http://svn.murderonvenus.com/externalj/trunk/README to read more about it
>
> Better documentation in the coming days.
>
> To give some very general performance numbers, with CouchDB 0.10.x current
> and ExternalJ 0.10.x.7, I was able to index the entire contents of the FAA's
> us airport database (about 20,000 entries). The index took about 60 seconds
> to build and lived in about 800 KBytes of memory (total ExternalJ overhead
> about 4 MB). Querying the nearest 10 entries to an arbitrary point takes
> about 40ms the first time and almost 0 after that (query cache). Finding all
> the points within x miles of an arbitrary point (using a formula "accurate"
> on the surface of the earth) takes 30-300ms, and will be further optimized
> with distance calculation caching in the future.
>
> It runs fine along with Couch on a 256 MB slicehost.com "slice" (a Xen
> instance). Also running, nginx proxy and php_cgi.
>
> In addition to the Geo applicaiton, I've included a trivial HelloWorld
> application and a somewhat trivial Say application which can be used as the
> starting point for your own external process. ExternalJ can also be run from
> the console, so that you can "see" the interaction with couch, and there are
> special "$command" commands outlined on the web page to give you some
> insight into running times and heap size.
>
> If you have any questions, please drop me an e-mail or drop a comment on
> the ExternalJ page.
>
> ~ Christopher
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message