spatial search & search radius circumference with Geokit

9 views
Skip to first unread message

Xin

unread,
Jan 3, 2008, 8:34:56 AM1/3/08
to georuby, an...@earthcode.com, bill_ei...@yahoo.com
I am using Geokit to search for points within X miles of a location.

I would like to show this search region as a circular polygon in
Google
Maps. For this I need a number of points around the circle's
circumference.

My original thoughts were to generate the boundary points myself, but
then my thoughts drifted to Geokit.

Geokit is computing the region already. Is there a way of exposing
this
so I can get the boundary points?

Any help and advice is greatly appreciated.

I am going take a look under Geokit's hood to see if I can find a way.

Note: cc'd Geokit's authors. Also cross-posted to
http://www.ruby-forum.com/topic/137447#611325

bi...@billeisenhauer.com

unread,
Jan 3, 2008, 9:38:36 AM1/3/08
to georuby
GeoKit uses formulas to make calculations internally for determining
the distance between an origin and points. It never needs to know
points on a circle as a bounding type of tool. I could see why your
UI would want one, though.

Its possible to code a helper method which would provide points on a
circle given a distance and a number of points. I haven't researched
how to do this on a sphere, but maybe that type of precision is not
called for. Out of interest, what would your API look like?

Cheers,
Bill
Reply all
Reply to author
Forward
0 new messages