Adding constraints to geopoint

Greetings All ,

Can we add any constraints to geopoint data type . Like if i have a map of a particular region , i don't want my coordinates to fall out of that regions lat lng coordinates . Can we add any constraint to that?. It's an urgent requirement .
Thank You in advance .

Regards,
SGSC .

1 Like

I recently came across this article which suggests an approach for doing geofencing.

You can also convert a geopoint to a string using the string() function and then use regular expressions to split it into latitude and longitude and do simple calculations on those. The sample form in the article above will give you ideas on how to do that as well.

3 Likes

Search Results

As Helene said if you convert your geopoint to string then get the (lon1, lat1) for p1 nad the same with p2
You will be able to get a range (lon1, lon2) of Longitude and range (lat1, lat2) for Latitude which will make a rectangle of area.

tmp

1 Like

Also with IF you can make shapes more complex than rectangular.