1

I am trying to find the XY coordinates that can be allowed with the tolerance of 2 meters.

enter image description here

In the above image, When the user(smiley) with GPS reach the ----- border line, the system should understand that user is in the coordinates (with tolerance of 2 meters). How to validate this?

Could anyone help me on this?

2
1

And if you are not using GIS it simply becomes

if user_x > inner_lowest_x - tolerance
   and user_x < inner_lowest_x + tolerance
   and user_y > inner_highest_y - tolerance
   and user_y < inner_highest_y + tolerance
   then:
     user is inside
   else:
     user is outside

...and then beware of the corner cases, where the user is near 0° or 180° lat/lon .

0

As commented it depends on the software you use. Generally I would get the coordinates of the tolerance rectangle. Use the search function of the forum on how to transform coordinates from a given format to meters. Then calculate the coordinates of the tolerance rectangle and check if the user's position is inside. If true you can check if he is in the inner rectangle.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.