Pierre a écrit :
Here is some code + corresponding output, you will see that it retrieves a point located outside bbox :Yep Adam, you're right. Turning into string seems to turn false to true. Good point but it doesn't solve my troubles completely.I try to copy paste some code and output to show you some weird things. Regards, Pierre On 4 sep, 19:31, Adam <[EMAIL PROTECTED]> wrote:Should you be using: str(hashPoi) > str(hashSW) or Geostring instead? A On Sep 4, 6:59 am, Pierre <[EMAIL PROTECTED]> wrote: geoHash1 = geohash.Geohash((float(point[1]), float(point[0]))) geoHash2 = geohash.Geohash((float(point[3]), float(point[2]))) logging.info(" SW : "+str(point[0])+" "+str(point[1])+"\n\t\t"+str(geoHash1)) logging.info(" NE : "+str(point[2])+" "+ str(point[3])+"\n\t\t"+str(geoHash2)) pois = db.GqlQuery("Select * from Poi WHERE geoHash >:1 and geoHash <:2",str(geoHash1),str(geoHash2)) pois1 = Poi.all() logging.info("Points already in the datastore : ") for poi in pois1: logging.info(" Geohash poi "+poi.geoHash+" poiKey : "+str(poi.key())+" lat : "+str(poi.lat)+" Lng : "+str(poi.lng)+" ") logging.info("-------------------------------------------------------") logging.info("Points for the given Bbox : ("+str(point[0])+","+str(point[1])+")->("+str(point[2])+" "+ str(point[3])+")") if pois.count() != 0: for poi in pois: logging.info(poi.geoHash+" poiKey : "+str(poi.key())+" lat : "+str(poi.lat)+" lng : "+str(poi.lng)) ************************************************************************************ And now, let's have a look at some output when draging map around and trying to see if point disapear both from screen and from query result when out of the (SW, NE) bbox : INFO:root: SW : 43.26720631662829 4.61151123046875 speq0uw18pb50 INFO:root: NE : 44.18220395771566 8.12713623046875 spvg2gn5bpb08 INFO:root:Points already in the datastore : INFO:root: Geohash poi spfb018s0yn6w poiKey : ag9hbmFseXRpY3NtYXNodXByCQsSA1BvaRgBDA lat : 43.602709 Lng : 3.867915 INFO:root:------------------------------------------------------- INFO:root:Points for the given Bbox : (43.26720631662829,4.61151123046875)->(44.18220395771566 8.12713623046875) INFO:root:spfb018s0yn6w poiKey : ag9hbmFseXRpY3NtYXNodXByCQsSA1BvaRgBDA lat : 43.602709 lng : 3.867915 ********************* Clearly : the unique point should be OUTSIDE the bbox thus not return in output "Points for the given Bbox". So, Am I doing something wrong either with datastore / GQL or geohash ? Thanks. Pierre --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~--- |
- [google-appengine] Problems with Geohash / Inaccuracy / ... Pierre
- [google-appengine] Re: Problems with Geohash / Inac... Ubaldo Huerta
- [google-appengine] Re: Problems with Geohash / ... Pierre
- [google-appengine] Re: Problems with Geohas... Adam
- [google-appengine] Re: Problems with Ge... Pierre
- [google-appengine] Re: Problems wi... Pierre VANNIER
- [google-appengine] Re: Problem... Adam
- [google-appengine] Re: Pro... Pierre
- [google-appengine] Re: Pro... Mark
- [google-appengine] Re: Pro... Pierre VANNIER
- [google-appengine] Re: Problems with Geohash / Inac... [EMAIL PROTECTED]
