Re: Points within polygons
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.
Subject
Views
Written By
Posted
7938
February 18, 2010 06:50PM
3220
March 27, 2010 04:29AM
Re: Points within polygons
4262
April 09, 2010 01:33AM
3054
April 09, 2010 01:50AM
5344
April 30, 2010 04:43PM
3216
April 30, 2010 06:48PM
2795
April 30, 2010 09:38PM
4239
May 03, 2010 05:33AM
3385
May 06, 2010 08:56AM
4672
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.