Proximity Search only returns results for exact latitude and logitude

103 views
Skip to first unread message

Keith

unread,
Dec 14, 2011, 6:16:40 PM12/14/11
to javageomodel-discuss
Hello,

I'm using javageomodel to search for locations within a proximity of a
given point

I have a JdoLocation class with fields (with appropriate getter and
setter methods) as follows:

@Persistent @Latitude private double latitude;
@Persistent @Longitude private double longitude;

And I do my search like this:

GeocellQuery baseQuery = new GeocellQuery();

List<JdoLocation> locations = GeocellManager.proximitySearch(
new Point(myLatitude, myLongitude), 100, 160000,
JdoLocation.class, baseQuery, persistenceManager, 13);

My data is stored in the GAE Datastore and I am able to get results if
I search for a lat/lon that exactly matches one in the datastore - but
will not find other results regardless of the maxDistance and/or
resolution.

Also - to clarify - the maxDistance is in Meters - correct?

Can anyone help me out or offer some advice?

bharat sharma

unread,
Dec 14, 2011, 10:25:45 PM12/14/11
to javageomod...@googlegroups.com
Keith.

 THis is what I am doing

listOfCompanyId = GeocellManager.proximitySearch(center, 40,
                        32186.88, PMFEntity.class, baseQuery, pm);
               

The distance is in meters .. this works perfectly but slow

Let me know if you have any questions

Thanks
Bharat
--
Thanks
Bharat Sharma
9046139204
Java/J2EE
bha...@gmail.com

Keith

unread,
Dec 15, 2011, 10:00:09 AM12/15/11
to javageomodel-discuss
That looks essentially the same as mine - the only big difference
being the maxResults and distance. What I'm not understanding is why
it isn't returning the "proximity results" - those points within the
range of the specified max distance of the center point.
Reply all
Reply to author
Forward
0 new messages