MySQL Forums
Forum List  »  GIS

Point in Polygon myWithin FYI
Posted by: steve wood
Date: August 19, 2010 05:27AM

The function myWithin found at http://forums.mysql.com/read.php?23,366732,366732 only works if you 'close off the polygon'.

In the example provided by the author:

SET @point = PointFromText('POINT(5 5)') ;
SET @polygon = PolyFromText('POLYGON((0 0,10 0,10 10,0 10))') ;
SELECT myWithin(@point, @polygon) AS result ;

..the second line should be as follows, noting the final "0 0", closing the polygon at it's starting point.

SET @polygon = PolyFromText('POLYGON((0 0,10 0,10 10,0 10,0 0))') ;

Options: ReplyQuote


Subject
Views
Written By
Posted
Point in Polygon myWithin FYI
5353
August 19, 2010 05:27AM
2569
September 15, 2010 10:03AM


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.