0

Contains is the opposite of Within:
if a polygon contains a point, then the point is inside (within) the polygon
AND not just in the MBR box

0

I just read the preceding posts And I not sure what you are looking for:
the nearest point to another point or a point within a polygon?
for the nearest, select points inside a box (quick with SQL) and then
SQL SELECT GLength() AS distance
ORDER BY distance
Do you know how to attach a jpeg to a post? is it possible?

0

Dear Jjc,
Actually first I was looking at the nearest point. Then only I was looking for a point in the polygon. So based on your suggestion I will then use the Within but I am still not clear then when to use contain?

0

For points in polygon, the choice is not critical:
(g is for geometry)
Within(g1,g2) tell you if point g1 is inside g2 and return 0 (false) or 1 (true)
Contains(g1,g2) tell you if the polygon g1 contains completely the point g2
I don't see any reason to prefer one or the other;
they probably both refer to the same routine.

0

Dear Jjc,
So in this case both doing the same job right? Thank you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.