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
7987
February 18, 2010 06:50PM
3241
March 27, 2010 04:29AM
Re: Points within polygons
4287
April 09, 2010 01:33AM
3071
April 09, 2010 01:50AM
5361
April 30, 2010 04:43PM
3239
April 30, 2010 06:48PM
2817
April 30, 2010 09:38PM
4253
May 03, 2010 05:33AM
3401
May 06, 2010 08:56AM
4689
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.