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 http://forge.mysql.com/wiki/GIS_Functions
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


Subject
Views
Written By
Posted
7825
February 18, 2010 06:50PM
3169
March 27, 2010 04:29AM
4165
April 09, 2010 01:33AM
2999
April 09, 2010 01:50AM
5233
April 30, 2010 04:43PM
3161
April 30, 2010 06:48PM
2742
April 30, 2010 09:38PM
Re: Points within polygons
4164
May 03, 2010 05:33AM
3317
May 06, 2010 08:56AM
4598
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.