Posts

Showing posts from November, 2010

Drive along - Cool coding

This is something that will demonstrate to you the power of mapping! This is a Google Maps API v2 example, but just copy and paste the code in an html file and you will see something very cool! This will prove that mapping is real fun!

         Let's have a look at the code first. Copy this code in your html file. Don't worry about the length of the code and the post in general. Just execute the code and you will surely enjoy what you see!

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>
Drive Along
</title>

<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=ABQIAAAAu3HXU_hLdVPTFGqLed_FCxT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQbblEPYBGNoRsuuSU9aBfSq4VAZA" type="text/javascript">
</script>

<script src="http://econym.org.uk/gmap/epoly.js" type="text/javascript">
</script>

</head>…

GIS as a vocational elective from June 2011

As 13 schools affiliated to the Central Board of Secondary Education (CBSE) across India are set to introduce a course on ‘geospatial practices’, a vocational elective for Std XI and XII from 2011, principals and teachers will be trained by an industry partner on ways to implement the programme, next month in Mumbai. The course will be expanded to other schools later.

            Among the 13 schools, RN Podar School in Santa Cruz will be the first school in Mumbai that will introduce this course which focuses on various components of geographic information system/geospatial information systems (GIS) and remote sensing.

            GIS is an emerging field and there is a lot of demand for candidates who are trained in GIS applications and technology today. It has a lot of relevance and so far no school has been providing education in this field. The subject is inter-disciplinary and covers various areas like geography, physics and mathematics, to name a few.

  …

National Symposium on Remote Sensing and Geoinformatics in Infrastructure Development and Management

With the focus of the nation shifting towards infrastructure development, through national programs like JNRUM, IRDP, and the participation of private players in infrastructure development, it is projected that annual investments to the tune of Rs. 1,000 Billion will be made in the country across the next 5-7 years. The efficacy of Geoinformatics and Remote Sensing in Infrastructure planning, development and management is well recognized and promoted by the Department of Space and other governmental agencies. In this context, the National Symposium and ISRS Annual Convention is organized on the topic "GIS AND REMOTE SENSING IN INFRASTRUCTURE DEVELOPMENT" from the 29th of November, 2010 to 4th December, 2010.
           The Symposium will expose the frontline developments in remote sensing and Geoinformatics to the infrastructural developers, enabling the latter to appreciate the cost-saving and accuracy enabled by the technology. It is expected that t…

What is GPS?

Image
Having seen what GIS is, we will now have a look at what GPS or the Global Positioning System is! Wikipedia's following GPS definition says it all. "The Global Positioning System (GPS) is a space-based global navigation satellite system (GNSS) that provides reliable location and time information in all weather and at all times and anywhere on or near the Earth when and where there is an unobstructed line of sight to four or more GPS satellites."

           The Global Positioning System (GPS) is a satellite-based navigation system made up of a network of 24 satellites placed into orbit by the U.S. Department of Defense. The 24 satellites are orbiting the earth about 12,000 miles above us. They are constantly moving, making two complete orbits in less than 24 hours. These satellites are travelling at speeds of roughly 7,000 miles an hour.

          GPS satellites are powered by s…

Fedora Geo Spin

It's here! An GIS oriented Operating System!...Currently under development with a target release as Fedora 15, Fedora Geo Spin is a collection of mapping tools that run on Fedora. This includes tools for map making, integration into OpenStreetMap, and components that can be run on a GPS enabled device.

         This spin will include map making tools that integrate with OpenStreetMap. This will enable map makers to use Fedora as a platform for cartography.The end goal is an ISO and kickstart that can be depolyed to work with most cartography setups.

         Integration with developer tools for developing other programs that work with GPS devices. This may lead to a developer subspin that integrates development libraries and tools including for GPS devices. This probably includes a group in comps for handling Geo related libraries and the development counterparts.

         This Geo spin can be integrated with MIDs and other devices that can be enabled with a GPS, to c…

What is GIS?

Once I started writing this blog, I received a number of feedbacks from readers asking me to write something about what exactly GIS is. So here is some information, that will give you an idea about "What is GIS?"

          A geographic information system (GIS) integrates hardware, software, and data for capturing, managing, analyzing, and displaying all forms of geographically referenced information. GIS allows us to view, understand, question, interpret, and visualize data in many ways that reveal relationships, patterns, and trends in the form of maps, globes, reports, and charts.

          A GIS helps you answer questions and solve problems by looking at your data in a way that is quickly understood and easily shared. GIS technology can be integrated into any enterprise information system framework.

          People use GIS to map locate where things are and let you find places that have the feature that you are looking for, and to see where to take a…

Tripura to use satellites to track terrorrists

Tripura will soon use satellites to track terrorists in the state, director general of police K. Saleem Ali said on Sunday the 14th of November, 2010 adding that the state's three-decade old militancy will be "flushed out within the next few months". Tripura would be the third state in India, after Jammu and Kashmir and Jharkhand, to introduce the Geo Satellite Imagery Systems (GSIS) for curbing militancy.

          The satellite image would be as clear as if taken from 10 feet above the ground. All district police chiefs would operate this new system to locate the activities of the separatist outfits. All the police stations of the state are being connected electronically for better coordination. In the first phase 22 out of the 66 police stations would be linked!

          A new method to register a FIR through SMS will also be introduced and would commence from January next year with the help of the National Informatic Center.

Source: Hindustan Times

Form info window

Image
Today we will look at a Google Maps API v3 example to add a form in the information bubble! This is usually required when we wish to accept some data/information from the user! This data can be saved to a server in the form of an XML file or a database! The information can then be retrieved back at a later stage, when necessary!

         In this example we will only look at form in the information bubble! The connectivity part with the server will be discussed in another post! So, today's code snippet is as seen below!

<html>
<head>
<title>
Google Maps API v3 - Adding marker and info window on Click and creating a form in the infowindow with the lat-lng information in it.
</title>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
var map;    //When using event as a parameter to a function declare map, strictly as a global var…

Static Info window only...

In our last Google Maps API v3 example we saw how info windows appeared on user click. We saw why such a thing is necessary and the benefits of that! Today we will look at a very simple example, where in we will place a single marker on the map! Something like a simple marker example in this post!

          Our today's code is below!

<html>
<head>
<title>
Google Maps API v3 - Simple info window only example
</title>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false">
</script>
<script type="text/javascript">
var map;
function click_window()
{
             map = new google.maps.Map(document.getElementById("map"),
             {
                              zoom: 5,
                              center: new google.maps.LatLng(22.7964,79.5410),
                              mapTypeId: google.maps.MapTypeID.ROADMAP
             });

             var html = &qu…

Jugnu: India's first Nano Satellite

IIT-Kanpur with its nano satellite 'Jugnu' has set new highs in the field of space research. A team of students, working under Dr NS Vyas (the visionary man behind the making of the nano-satellite) and other faculty members of the institute, have successfully made the country's first nano-satellite to be developed for the first time by any educational institute.
          The development of the Jugnu started in the year 2008 with a team of 3 students. With time, the team has grown to the size of more than 50 students ranging from 1st year undergraduates to final year postgraduates and 14 professors from different disciplines to complete this challenging mission.            The satellite has been handed over to two ISRO scientists, DVA Raghav Murthy (Project Director, Small Satellite Projects) and Dr SK Shiv Kumar (Director, ISRO satellite tracking centre), by President Pratibha Patil on March 6, 2010. View the pictures of the ceremony at IIT Kanpur's phot…

Playing with the markers and info window bubbles...

In the last few posts, we have seen some marker examples and some information window examples. Now, lets do something interesting combining these two things. Just writing that "This is an info window" in the information bubble is not very interesting! And I know this...Have gone through the same phase!

    So, today we will do something interesting! We will display the latitude- longitude co-ordinates of the point that the user clicks on the map! Doing this is not at all complex! Copy paste the following code and you will see for yourself a map coming to life!


    The output of the above code looks as seen in the result section above! If you have any queries regarding the above code please comment on the blog post or feel free to contact me at my mail ID.

Only information bubbles...

Image
After displaying markers and markers with info windows, we will now display only info windows on the map. So our aim becomes, placing an info window on a google map when a user clicks on the map.

         Now, the first question that will pop up in your mind is why do we need such a thing? To answer this question let us consider a simple example. Consider that, when an user clicks on a map, a marker appears with an info window and you want the user to enter some data in a form in the info window and save that data. Now, if the user enters inconsistent data, there would be marker on the map, having no valid information! The marker would then be rendered useless, with no information! Something like a dangling pointer!

          Now, if you haven't understood a word of this; don't worry. You will soon understand the importance of this example! So, without any further discussions, let's have a look at the code!

          Here goes the code...

<html>
<head>

Code for fun..!

Just wrote a small 3 lines shell script which is capable of searching any random place on Google Map. Try it on your linux boxes! For those who prefer windows, I am sorry to say that this code will not run on your machines. I work on linux system and so I am using some linux specific commands in the script!

         So here goes the shell script!

while [ $? == 0 ]
do
    zenity --info --text="Do not use spaces between multiple words. Instead use the + sign. For example 'new+delhi and not new delhi'"

    search=`zenity --title "Google Maps Location Search" --entry --text "Search: "`

    if [ $search ==  ]
    then

        zenity --question --text="Do you wish to search another location?"

    else

        firefox http://maps.google.com/maps?q=$search

        zenity --question --text="Do you wish to search another location?"
    fi

done


        See the results for yourself! It's simple and easy. Shell scripting and GI…

A marker with an information window

Image
Following the sequence, I should be discussing a marker based example! Markers loading from an XML file. But, we will disrupt the sequence for the sole reason that I don't want to discuss comparatively tough examples as of now! So, we will jump on to a simple example to display an information window or the info window bubble as it is popularly known; along with a marker!

         Let's have a look at the following code. This is a simple code which will place a marker at "India" with an information window attached to it which appears only when the marker is clicked! The code goes as below:

<html>
<head>
<title>
Google Maps JavaScript API v3 Example: Simple  Infowindow
</title>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false">
</script>
<script type="text/javascript">
function initialize()
{
    var myLatlng = new google.maps.LatLng(22.7964,79.5410);

    …

GIS India News Titbits

Treading on the foot steps of Gujarat for improvement in governance, the Himachal Pradesh government on Wednesday, 10th November 2010, announced to set up geo-informatics centre for planning with help of the latest digital techniques under supervision of department of science, technology and environment.
         Chief Minister Prem Kumar Dhumal said the centre would be set up on the lines of Bhaskaracharya Institute of Space Applications and Geo-Informatics (BIGSAC), Gandhinagar, Gujarat, and would be named as Aryabhatta Geo-Informatics and Space Applications Centre (AGiSAC).
         Departments that are directly linked with common man including Revenue, Forest, Education, Health, Agriculture, Horticulture, Panchayati Raj and Rural Development would be the first ones to be taken up for planning under the project by digitisation of their record. This would make the working transparent and by making information available to the people on internet.
            State has alrea…

Multiple markers...

It rarely happens that there is just one point of interest or just one location that you would like to mark! Generally there is a bunch of markers that appear on the map! Specifically, you want a list of latitude and longitude pairs representing the points of the markers you'll plot.

            To store the list of points, you can combine the power of Javascript's array and object constructs. An array stores a list of numbered entities. To access the elements of the array, you must use their numeric indices. So array[0] will point to the first element in the array while array[n] will point to the nth element in the array.

            I will use the following piece of Javascript code to demonstrate how multiple markers can be made to appear on a map using the array structure and the for loop for iteration.



            Nothing here should be much of a surprise! You can see that the google.maps.Marker function is called for each of the markers, so you can see two mar…

Celabrate GIS Day!

Image
The countdown has begun...Only 4 days to go! On the 17th of November, 2010, the world will celebrate "GIS Day". GIS day is held each year in the third week of November, on the Wednesday during the Geography Awareness Week, a geographic literacy initiative sponsored by the National Geographic Society.

         GIS Day is playing a powerful role in creating geographic awareness throughout our world. GIS Day provides an international forum for users of geographic information systems (GIS) technology to demonstrate real-world applications that are making a difference in our society.

         More than 80 countries will participate in holding local events such as corporate open houses, hands-on workshops, community expos, school assemblies, and more. Any organisation that uses GIS can participate in this global event.

         Large or small, there are many ways you can participate. From showing a few co-workers what GIS does for your organisation to citywide schoo…

A simple marker example

Once you have set up your map as seen in the earlier post you can now place a marker at your point of interest on the map. A marker is a symbol that is used to point something interesting or important on the map! A marker can be overlayed on a map statically, dynamically i.e. when a user clicks on a map, a marker appears on the map. Markers can also be loaded from an XML file, a plain text file and also a CSV file. We will be seeing an example of each in the subsequent posts.

            Later on we will also see how to add an information window to the markers on the map! But that will be at a later stage. Let us have a look at the following code first which will add a marker at the Rajya Sabha, New Delhi.


           And here you are...You have placed a marker at your point of interest. The output will look as seen in the result section above. Feel free to change the point of interest and see a marker at a location of your choice. Happy mapping!

Geocaching - The world's largest treasure hunting game!

Geocaching is a high-tech treasure hunting game played throughout the world by adventure seekers equipped with GPS devices. The basic idea is to locate hidden containers, called geocaches, outdoors and then share your experiences online. Geocaching is enjoyed by people from all age groups, with a strong sense of community and support for the environment. The following video has been taken from "Geocaching - The official global GPS Cache Hunt Site". This site will give you a brief idea of what Geocaching exactly is!


          On May 2, 2000, at approximately midnight, eastern savings time, the great blue switch* controlling selective availability was pressed. Twenty-four satellites around the globe processed their new orders, and instantly the accuracy of GPS technology improved tenfold. Tens of thousands of GPS receivers around the world had an instant upgrade.

           The announcement a day before came as a welcome surprise to everyone who worked with GPS…

Simple Map using Google Maps API v3

Let us begin with our first example using Google Maps API v3. Even before a marker - the most basic element of a map, appears, the map should be seen on the screen. Let us have a look at the following javascript code first. We will then have a look at the elements in the code.

Ta-da a map in action! This map is centred at the Sansad Bhavan, New Delhi, India. In the above code the head of the document contains a critical script element. Its src attribute points to the location of the API on Google's server. In API v3 there is no need to obtain a key for the API. The remaining is simple Javascript.
          Happy mapping!!!

My first blog!

Image
"Why is it that there are no Goolge Maps API examples which show India specific data?"...This question kept bothering me all through my learning phase. I always thought why aren't there any examples that use a map which shows Indian locations.
Anybody who is new to Google Maps API application development would love to see a location that he knows of on the map! This is what I longed for all the way through and now have decided to put up simple examples and other supporting data for building customised simple Google Maps and all will show locations in India!
When starting something new, if one finds something familiar out there, then it gives a feeling of comfort! And this is what I will try to provide to all those out there who are facing a similar problem that I faced!
I am not an expert at Google Maps API, I am learning too...But, I will like to help out people along the way! So, all comments from the novice to the professionals are welcome!