MySQL Forums
Forum List  »  GIS

Re: Points within polygons
Posted by: Mike McCutcheon
Date: April 09, 2010 01:33AM

I might be wrong, but I have concluded that the distance() function in MySQL 5.1.35 can't handle a comparison of a point with a polygon which straddles (is positioned both sides of) the antimeridian (the 180th meridian).

My evidence comes from using distance() to measure whether the distance between a point and a polygon is zero or not and therefore identify whether that point is inside or on the polygon boundary. distance() can't tell me reliably whether a point is in my Oceania region (from Asia to the Americas), but when I split Oceania into two polygons along the antimeridian, distance() reliably tells me whether the point is in Oceania West or Oceania East. distance() seems to measure the wrong way around the world if the poly straddles the antimeridian.

I don't think distance() has a problem with the Greenwich meridian.

I haven't tested whether distance() has a problem comparing a point with a line which crosses the antimeridian.

Any thoughts please ? I apologize if I have done something wrong and am therefore inadvertently scaremongering.

Options: ReplyQuote


Subject
Views
Written By
Posted
7757
February 18, 2010 06:50PM
3137
March 27, 2010 04:29AM
Re: Points within polygons
4121
April 09, 2010 01:33AM
2967
April 09, 2010 01:50AM
5188
April 30, 2010 04:43PM
3123
April 30, 2010 06:48PM
2714
April 30, 2010 09:38PM
4130
May 03, 2010 05:33AM
3284
May 06, 2010 08:56AM
4564
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.