1

I am new to GIA domain. I am trying to learn new concepts around mapping etc and this is my first app/implementation. I am trying to implement a store locator kind of function.

I am thinking to calculate minimum latitude and longitude for a given geocode and distance. Lets say I have lat: 41.850, lng: -87.650 and distance of 10 miles. is it possible to calculate all possible lat and longitude? and from the resulting values i will find the minimum and maximum lat & long. I am using oracle 11g DB and Java/JavaScript

2
  • Can you be more specific about the store location function? What are the parameters of "storeLocatorFunction" and what does it return? My guess would be that you want to take a lat/lng and find the closest store correct?
    – bcollins
    May 18, 2016 at 21:46
  • All possible latitudes or longitudes are both nonsense
    – FelixIP
    May 19, 2016 at 4:44

1 Answer 1

1

Sounds like you want to use some kdtree. The idea is that you insert your points into a kdtree, and then query it based on some distance from a known point.

If your data is stored in Oracle, then use Oracle's built in spatial capabilities which should offer a radius based search on top of a point geometry type: http://docs.oracle.com/cd/B28359_01/appdev.111/b28400/sdo_intro.htm#i880253

If you implementing in JavaScript, I would first check out https://github.com/ubilabs/kd-tree-javascript and their example: http://ubilabs.github.io/kd-tree-javascript/examples/map/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.