MySQL Forums
Forum List  »  GIS

Longtitude wrapping problem with MBRContains
Posted by: Alastair James
Date: June 15, 2006 02:57AM

Hi there...

I am writing a mysql backend for a google maps app. The problem is: when you scroll when you try to request data when the left hand edge is at a positive lng and the right hand side is at a negative lng, the MBRContains function fails. I.e. if you have the map with the left hand edge over japan and the right hand edge over america, say for example x1=140, x2=-140.

Is there anyway of making MBRContains respect wrapping of the longtitude component?

The only way I can think at the moment is to check two seperate lng regions, i.e. in teh above example, (140 -> 180) and (-180 -> -140)... However I dont really want the performance hit this will give...

Any ideas?



Options: ReplyQuote

Written By
Longtitude wrapping problem with MBRContains
June 15, 2006 02:57AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.