0

How can I use haversine formula to filter query results in querydsl?

I've got two latitude and longitude columns in my table I need to get nearest places to a specific point by latitude, longitude within a specific distance

I need to use Haversine in "where" clause of my query but don't know how

By the way I'm working on a spring boot project (if it helps)

Please somebody help

Omid QSM
  • 1
  • 1
  • Do you need to use the Haversine formula because your homework problem told you to? Or are you able to use the geospatial query abilities built into SQL Server since 2008 to make that a reasonably efficient query? – Ben Thul Apr 06 '17 at 12:44
  • Actually I'm using sql server 2005 and there is no geo spatial type for storing data and I want to use querydsl to create dynamic query, There is no example in internet and I'm stuck with it – Omid QSM Apr 06 '17 at 20:17

0 Answers0