Geocoding, ovvero come ottenere coordinate geografiche da un indirizzo
In attesa di tornare a parlare di API, prendo spunto da una domanda fatta da un utente di questo blog e che suppongo possa essere utile a molti di voi. Abbiamo visto come visualizzare su una Google Map una serie di addresses and contact details, upload directly to the MySQL database or imported from a file . CSV (in fact, any foil eletttonico through appropriate processing).
Sometimes you have a number of addresses but not their geographical coordinates. Then there exists the possibility to automatically process a list of addresses by adding the coordinates we need?
One of the solutions we are offered this service by which uses Yahoo Maps .
How should our activities geocoding? It 's very simple
1. Downloaded to your PC excel template (Step # 1)
2. Fill out the template with the data in your possession (no need to exploit all fields)
3. Copy and paste in the box (Step # 2)
4. Click on the "Validate" (Step # 3)
5. Click on the "Run geocode" (Step # 5)
6. You will see a "new" list (Step # 6), including coordinates, ready to copy (just click with right mouse button, select all and copy to clipboard)
7. Paste the selection into Excel or Open Office .
After this simple procedure, you can save your csv file and be imported into the MySQL table, and then continue our work as we have seen in this article.
This is one of the ready-made solutions, in reality we create for ourselves a personal application that uses the service of Geocoding Google Maps API . That gets a request to the service (in REST ) and the answer may be in JSON format , KML , XML and CSV also. The speech, however, is rather complex and, perhaps, could be addressed in a separate post.
The thing to emphasize is that absolutely can not use the service to something that is different from showing the results on a Google Map.
0 comments:
Post a Comment