Reputation: 306
What is the difference between Contains
vs ST_Contains
and which one to use?
Contains(region_data," +"GeomFromText('Point(" + latitude + " " + longitude + ")'))
vs
ST_Contains(region_data," +"GeomFromText('Point(" + latitude + " " + longitude + ")'))
Upvotes: 1
Views: 789
Reputation: 31991
ST_Contains(g1, g2)
Returns 1 or 0 to indicate whether g1 completely contains g2. This tests the opposite relationship as ST_Within().
contains(g1, g2) uses MBR only (not exact!)
st_contains(g1, g2) uses exact shapes
I think this link will help you a lot MySQL Spatial Functions for Geo-Enabled Applications
Upvotes: 1