Thanks, but according to the documentation the Contains() function is the same as the MBRContains() function which only tests if the point is inside the minimum bounding rectangle of the polygon, not the actual polygon.
See the following: http://dev.mysql.com/doc/refman/5.0/en/functions-that-test-spatial-relationships-between-geometries.html
From the manual:
"Currently, MySQL does not implement these functions according to the specification. Those that are implemented return the same result as the corresponding MBR-based functions." On 7/21/06, ViSolve DB Team <[EMAIL PROTECTED]> wrote:
Hello Mark, You can locate a point, whether inside or outside a polygon area using the query below: SELECT contains(geomfromtext(@poly),geomfromtext(@p)); where @poly,@p are variables. Eg: set @p='Point(3 2)'; set @poly= 'Polygon((0 0,0 3,3 0,0 0),(1 1,1 2,2 1,1 1)) '; If the return value of the select statement is 0 -> Outside the polygon 1 -> Inside the polygon Thanks, ViSolve MySQL Support Team. ----- Original Message ----- From: "Mark Maunder" <[EMAIL PROTECTED]> To: <mysql@lists.mysql.com> Sent: Friday, July 21, 2006 4:40 AM Subject: Finding a point inside a polygon > I'd like to test whether a point is truly inside a polygon, not just > insude the minimum bounding rectangle. Is there a way to do this in > MySQL with the spatial extensions? I love mysql but I'm forced to > consider migrating to postgresql (ugh!) because it has built in > support for testing spatial relationships between polygons and points. > > Thanks. > > Mark. > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > >
-- Mark Maunder <[EMAIL PROTECTED]> http://www.markmaunder.com/ +1-206-6978723 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]