Friday, 17 December 2010

Visualization in Google Earth generated with KML using MATLAB

Well, I am bored again. That means time to write a new post :) . This time, I am going to utilized the knowledge that i have gained while writing my previous post KML creation with Matlab. I will show you Embassies of Nepal that are in different part of the world. I have used the same code that I have explained in the previous post and modified it so that i can display Embassy location as markers together with path connecting capital of Nepal and a particular Embassy location. The information about Nepalease Mission Abroad was taken from a page of Ministry of Foreign Affairs of Nepal. However, it doesn't contain latitude and longitude information that are required to draw point in Google Earth but instead it has only Address information. Therefore I downloaded the page information in MS Excel and formatted it as a list. Now, I have address information of each Embassy which needed to be Geocoded to get information about its latitude and longitude. Therefore, i wrote a PHP code which will send the addresses one at a time to Google and returns latitude and longitude information as a list. For those who are not familiar with PHP, similar task of converting address list to latitude and longitude list can be also achieved with this site.

Now my list in Excel looks like this.

Using that table and some coding in MATLAB, I created this beautiful visualization in Google Earth. Now that's cool. Isn't it? Flag of Nepal represents embassy of Nepal in that location and when a user clicks on it, information about it will be displayed in the pop up balloon. Double clicking on it, will zoom the Google Earth to that location.

I will write about the step wise explanation of MATLAB code to create such visualization next time when i will be bored again :). Now I am off for couple of beers after all its Friday evening! Ohh yeah!!

No comments:

Post a Comment