The pyKML – a Python library for manipulating KML

pyKML is an open source Python library for generating, parsing, and modifying KML, the geo-spatial data language used by Google Earth, Google Maps and a number of other GIS platforms.

I was motivated to create pyKML because I frequently need to visualize large, and often complex, environmental datasets. While the KML language has a wide range of options for styling, annotating and interacting with geo-spatial and temporal data, most programs that generate KML don’t take full advantage of these rich features. I created the pyKML library to address this problem by providing easy, programmatic access to all KML elements.

pyKML facilitates working with large and complex KML documents by leveraging the use of basic programming constructs (looping, branching, etc.). In this regard pyKML is similar to libkml, Google’s open source C++ library, but takes advantage of the highly readable syntax of the Python programming language and the processing capabilities of the popular lxml Python library.

As a simple example, check out this Python script that loops through a text string (“Hello World!”) and uses pyKML to create a series of KML Placemarks. You can download the resulting KML document, and below is a screenshot of how it looks in Google Earth.

This is just a teaser of what pyKML can do. For more complex examples, check out the pyKML documentation and the project’s Google Code site that includes sample code for: generating KML from CSV data, creating KML Tours, and visualizing ephermeris data for Stonehenge (e.g., orientation of the sun on different dates). pyKML can even be used to create “slides” for presentations!

To get started, browse the project’s documentation, install the library, try it out, and let us know what you think!

via:  Tyler Erickson, Senior Research Scientist / Engineer, MTRI

Google Street View with a Date

The Google Earth Blog noticed that Google Maps Street View images now come with a date telling you when the panoramas were taken.

If you look at the bottom left hand corner of a Street View image you can now view the month and year when the picture was taken.

Another nice little feature I’ve noticed Google Maps testing recently is the highlighting of search results. For a while now when you search for a location in Google it has shown a map with the searched area highlighted. Google have been testing this feature in Google Maps as well.

This feature still seems to be very much in the testing stage. I noticed the feature was working this morning but this afternoon it no longer seems to be working for me.

Finally, in Chrome (but not in Firefox and IE for me) the satellite button in Google Maps now shows the satellite view directly beneath the button.


Google Earth layers – NASA’s Earth Observation

NASA’s Earth Observation site dozens of layers of the global scientific data is formatted for viewing with Google Earth.

These are grouped into the ocean, atmosphere, energy, land, and the Life category. The layers are too many to list, but they include:

Sea surface temperature
Chlorophyll concentrations (MODIS)
Snow cover and sea ice extent
Cloud water content (MODIS)
Total precipitation (TRMM)
Water vapor (MODIS)
The temperature of the land surface
Active Fires (MODIS)
Land cover classification (MODIS)
Vegetation index [NDVI] (MODIS)
The population density

The layers are highlighted in red above were combined into a single network link, which you can download the screenshot below. This will give you a preview of some of the available data. Visit NASA’s Earth Observing site other overlays the data.

Download .KML file