MySQL Forums
Forum List  »  GIS

Re: Points within polygons
Posted by: Mike McCutcheon
Date: May 03, 2010 05:33AM

Hello Francine. I'm not a professional full-time programmer so I keep coming back to GIS issues "cold" so forgive me if I get this wrong but ...

MBR is minimum bounding rectangle. See
Many MySQL GIS functions don't yet operate on the precise coordinates of a polygon; instead, they put the smallest possible rectangle around the polygon and then do the (much simpler) maths using that MBR. That can be useful as a filtering step eg if the MBR of polygon X isn't inside polygon Y, there's no point in checking whether the precise coords of polygon X are inside Y.

So you might want to:
1. Decide which precise functions eg distance() you really need.
2. Install a version of MySQL which has those precise functions. I got my hosting company to install 5.1.35 for me (see that same web page above).
3. Pray that Holyfoot keeps up the good work and converts MBR-only functions to precise functions.

Before MySQL v5.1.35 there were about 18 precise functions. 5.1.35 added about 7 more. At least 8 more are planned for MySQL v6.

But also, surely the MySQL / GIS format for coordinates is "lat lng," so your examples above involve latitudes of 80 and 81 degrees south ? Hence my comment about distance() not seeming to work at high latitudes for me. You say that you don't use high altitudes but you seem to be misreading and therefore confusing my 2 points about altitude and latitudes:
1. Don't use any altitudes in distance()
2. distance() seems not to work at high latitudes.

Options: ReplyQuote

Written By
February 18, 2010 06:50PM
March 27, 2010 04:29AM
April 09, 2010 01:33AM
April 09, 2010 01:50AM
April 30, 2010 04:43PM
April 30, 2010 06:48PM
April 30, 2010 09:38PM
Re: Points within polygons
May 03, 2010 05:33AM
May 06, 2010 08:56AM
May 07, 2010 03:46AM

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.