mardi 18 juin 2019

Generate random latitude/longitude while avoiding oceans

I'm using https://randomuser.me/ to generate some random user data for testing. I'd like to geocode the latitude and longitude that provides to attach the real city/state/country information instead of the totally fake info that RandomUser provides. However, many of the actual lat/long values on these objects turn out to be in the middle of the ocean.

Is there an API, or some other method, that will let me get random coordinates which are always over land? I've seen this: Random geographic coordinates (on land, avoid ocean) But surely there must be some more efficient way than to just guess-and-check with constant geocoding until you find one that works, right?




Aucun commentaire:

Enregistrer un commentaire