0
How can I validate a geographic coordinate to know if it actually corresponds to a valid location? For example, -47.888477, -100.555444; These coordinates I didn’t pick up on any map, they’re random numbers that came to me now to use example, how do I know if it’s a valid coordinate?
What you consider a valid coordinate?
– rLinhares
For example, -47.888477, -220.555444 seems to me to be invalid because from what I saw searching the google-map, there is no longitude that reaches -220. I need to know exactly what valid coordinates are so I can create an algorithm to validate. I can validate the amount of characters typed but to validate whether the numbers passed correspond to a valid coordinate, I need to know exactly that, what the characteristics of a valid coordinate, I need to know things like, latitude can go from -X to X positive, longitude of -X to X positive etc..
– Matheus Saraiva
Matheus, in a normal situation in everyday life, what would be the need for this validation? Taking into account that it is not feasible to ask a user to enter their coordinates in a text area.
– Jorge.M
It won’t be! The coordinates will come from devices running apps integrated with the google map api, but I want to have some validation in my application, even though the chances of apps sending an invalid coordinate are very small. The mobile app will take the location coordinate and send via web service.
– Matheus Saraiva