I have a database with fields including latitude, longitude, city, state, and country.
When mapped, it is clear that a number of the sites are in the wrong location - most commonly because of a sign error:
I was thinking of writing a script to check for such errors, along the lines of
if country = USA and lon > 0 set lon = -1*lon if country in (select names from europe) and lat < 0 set lat = -1*lat
This would be followed by additional checks by plotting the sites with their names over google maps, but this would get most of the errors.
- What pitfalls to this approach should I anticipate?
- Any suggestions for how to do comprehensively way?
- Are there existing scripts that do this? It is hard to imagine that I am the first to face this issue.