emetselaar commented on issue #9847:
URL: https://github.com/apache/druid/issues/9847#issuecomment-703488933


   I made one workaround like this:
   
   ```sql
   SELECT
   MyDataRows,
   FROM "Datasource"
   WHERE
   (POWER(DataLatitude-52.1, 2) + POWER( 
(DataLongitude-5.1)*COS(RADIANS(52.1)),2)) < POWER(5/68, 2)
   ```
   I am searching around Lat =52.1 and Lon = 5.1 with a radius of 5(km) and I 
assume that 1 degree is 68 km length at my latititude.
   
   The result will be all rows that have a DataLatitude and DataLongitude 
within that radius. 
   
   This is based on
   
https://jonisalonen.com/2014/computing-distance-between-coordinates-can-be-simple-and-fast/
 (the SQL part)
   and the table at the following page to get the 1 degree is 68 km (the 
contstant at the end of the formula):
   https://en.wikipedia.org/wiki/Longitude#Length_of_a_degree_of_longitude
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to