I have create a table (municipal_border), in MySQL 5.5, that holds some boundaries.
CREATE TABLE `municipal_border` (
`boundary` polygon NOT NULL,
`municipal
After a night sleep I found the following solution.
set @p = GeomFromText('POINT(23.923739342824817 38.224714465253733)');
select municipalID FROM ecovis.municipal_border
where ST_Contains(municipal_border.boundary, @p);
It is working for MySQL 5.6.1 where ST_ prefix function have been implemented. Although I haven't any measurments from a classical approach (x-ray algorithm) I believe that is quite fast. It needs 0.17 seconds to locate a point in 2700 polygons with some polygons having well more than 1,500 points.