I'mm trying to implement OrientDB Spatial Module and need some help on coding it in Java.
How do I do the equivalent query in Java:
select *,ST_Distance_Sphere(location,ST_GeomFromText('POINT(12.4696635 41.8894657)')) as distance from Points where ST_Distance_Sphere(location,ST_GeomFromText('POINT(12.4696635 41.8894657)')) < 200 order by distance
Thanks!
The only way is to use OSQL:
List<ODocument> execute = db.query(new OSQLSynchQuery<ODocument>(
"select *,ST_Distance_Sphere(location,ST_GeomFromText('POINT(12.4696635 41.8894657)')) as distance from Points where ST_Distance_Sphere (location,ST_GeomFromText('POINT(12.4696635 41.8894657)')) < 200 order by distance"));
Does it helps?