Hi Here
select ... where ( data > left OR right < data ) This will return data like +175 or -175, For this condition some of the non existed under this bounded rectangle data also coming, Under this particular top-right and bottom left some data is there and beyond this bounded rectangle also data also there that data also coming in a dataset.Only for this bounded region should come,how we should check the condition now Thanks. Gopi On Jun 5, 5:04 pm, Rossko <[email protected]> wrote: > > Like this I am fetching lat and lng paits of both TopRight and > > BottomLeft Corners Is it Correct Approach? > > Yes. It's not your bounds that are the problem, it is the way you use > them in your search. > Your ordinary search > select ... where ( data > left AND data < right ) > works fine in most cases. e.g. +90 to +150, -80 to -30, even -20 to + > 20. > > But - if your bounds crosses the dateline, you will need to search say > between +170 and -170. Your ordinary search will fail to produce > anything because "left" is bigger numerically than "right", no data > will be found that is both bigger than +170 and less than -170 at the > same time. > > You can't just swap over left and right, because then you would be > searching the wrong part of the world, between -170 and +170 i.e. most > of the world. > So you have to detect when your bounds crosses the dateline, and then > use a different search for that case. > select ... where ( data > left OR right < data ) > This will return data like +175 or -175, and not return data like +165 > or -165 > (I made an error earlier and got the OR wrong) > This assumes you have no nonsense data like +200 > > If you detect that the bounds doesn't cross the dateline, you use the > ordinary search. > > cheers, Ross K --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" 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-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
