Share

Explainer: How to view and interact with KML files

October 28, 2024 Vaidya R

KML stands for Keyhole Markup Language and it is an XML based format for map files. These files contain map related data which can be divided into three types. They are:

  • Points – Locations with X,Y coordinates that specify a point of interest. Examples are locations of police stations, post offices or fire stations. Each point is a single coordinate.
  • Polygons – Larger boundaries that enclose a named area. Examples are state boundaries, district boundaries, wards, police station jurisdictions. Each polygon is multiple coordinates, but the first and the last coordinate are the same as it encloses an area.
  • Linestrings – Straight or curved lines. Examples are roads of a city, metro lines and bus routes. Each linestring is multiple coordinates, but the first and last coordinate are usually far apart.

The map data stored on OpenCity.in is usually in the form of KML files and can be viewed on our OpenStreetMap base (which is temporarily not working, but we are working to fix it!). But we prefer that you download the file and view it on other more interactive platforms. In this explainer we show you how you can use free easily accessible tools to view the map files.

First, download your map file. Let’s say you want to view the Police Jurisdictions Map for Bengaluru, you would need to download the KML file first from here (click on Download and DOWNLOAD in the dropdown box). Now that you have the file, there are two methods to view these files.

Google Earth Pro Software

Google Earth Pro is a free downloadable software from Google.

  1. You will first need to download it from here.
  2. By default kml files open on Google Earth Pro. So if you double-click the downloaded kml file, it will automatically open on Google Earth Pro. Otherwise you can navigate through File->Open to the file and open it.
  3. You can click on any location and see the details in a pop-up. Here the area near Koramangala comes under Adugodi Police Station.
  4. You can also search a landmark and find out where it falls by using the search bar on the top left panel. For instance, you can look for Ecospace SEZ and find where it falls.

    Interestingly, you will notice that the police jurisdiction is split inside Ecospace and the buildings on your right side of the main road when you enter fall under Bellandur Police Station limits and your left side of the main road under Marathahalli Police Station limits.

There are no file size restrictions for Google earth, but if you want to share the map above with someone else, you’d have to request them to download google earth and send them the kml file.
Google earth provides only a satellite view and not the road map that is commonly seen on Google maps.

You can use the alternative given below to solve both these issues.

Online shareable maps with “Google My Maps”

Google My Maps is a very easy to use and freely available tool.

  1. Launch Google My Maps by opening a new tab in your browser and entering “https://www.google.com/maps/d“.
  2. This will open a site with all your maps. If there are none, it will be empty.
  3. Click on “CREATE A NEW MAP” on the top left.
  4. This will open a new page with “Untitled Map” as the Title. You can click on “Untitled Map” and rename it to a proper name. In this case we will call it “Police Jurisdictions in Bengaluru”.
  5. In the same page, under the Untitled Layer, click on Import. This will open a new dialog box.
    In this dialog box, click on Browse and navigate to the kml file dowloaded above from OpenCity.in.
  6. The file is now loaded.
  7. You can click on the map inside each boundary to know details of the Police Station.
  8. You can also search for a landmark or the address of your interest by using the search bar on the top. This will show you the boundary the landmark falls under. Clicking on the polygon can give you the police station details.
    For instance to find out which police station, Prestige Falcon City falls under, type Prestige Falcon City on the search bar which will add a point to the location in the map. Clicking around the point gives you the police station as Konanakunte PS.

  9. You can also share the above map publicly with others. Click on “Share” on the top left below the title. In the dialog that comes up toggle “Anyone with this link can view”. You can copy the link in the dialog below and share it with others.

You can also add more layers to the map, like the traffic police stations etc and share it with others.
Note that there is a size limit of 2MB for the Kml files in Google My Maps.

Related