Using the simple table below, I'm trying to select the 'latlng POINT' that is within the POLYGON given. But the return is always empty, what am I missing?
CREATE TABLE mypoi (
id int not null auto_increment,
latlng POINT not null,
primary key(id)
)ENGINE=MyISM;
INSERT INTO mypoi VALUES
(1 , POINT( 39.274, -94.4233 )),
(2 , POINT( 39.5, -94.3483 ));
SELECT id, x(latlng), y(latlng)
FROM mypoi
WHERE MBRContains(GeomFromText('POLYGON((39.48025, -94.73566 , 39.48025, -94.09021 , 39.09122, -94.09021 , 39.09122, -94.73566))'),latlng);