OrientDB geolocation -


i´m using orientdb nosql database, , dont know how query in geolocation exactly. i´ve read specific documentation:

orientdb functions

but not understand significance of values.

the distance function:

distance() - computes distance between 2 points in globe using haversine algorithm. coordinates must degrees

example:

where distance(x, y,52.20472, 0.14056) <= 30

two questions:

  1. what x, y, , 30 values?
  2. are values (52.20472, 0.14056) latitude , longitude?

thanks!

distance(x, y,52.20472, 0.14056) <= 30

x , y longitude , latitude (variables) respectively of record/position calculating distance fixed coordinates 52.20472, 0.14056.

consider example:

select distance(longitude, latitude, 52.20472, 0.14056) <= 30 distance places order distance

this query loop through records in places class/cluster , each record injects longitude , latitude of record , calculate it's distance fixed position (52.20472, 0.14056) , return places within 30m.

where

places class/cluster contains records of places longitude longitude field of current record latitude latitude field of current record distance alias field name


Comments

Popular posts from this blog

Why can rails not find a route created by a helper? -

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -