geokit / geokit-rails

Official Geokit plugin for Rails/ActiveRecord. Provides location-based goodness for your Rails app. Requires the Geokit gem.
MIT License
1.57k stars 245 forks source link

Searching within Polygons #59

Closed dvodvo closed 10 years ago

dvodvo commented 10 years ago

Searching on the basis of a rectangle can be rather artificial; most of all, it can be contextually misleading. Have you investigated the possibility of defining multiple points and searching within that area?

Many avenues can be thought of: • searching multiple vectors (n-1 points of the polygon); • working one's way through northern-most & southern-most points, as well as eastern-most and western-most points, then middling points; • defining a central point (not necessarily center) and outlying points to alleviate the filtering...

mnoack commented 10 years ago

I haven't planned to do anything but I'm always open to people submitting Pull Requests if you can provide the code and tests.