More about processing Sentinel imagery

We recently had a look at how to process Sentinel imagery using GIMP. GEB reader ‘DJ’ asked in the comments if the geodata supplied with the imagery can be used to automatically align the imagery in Google Earth, rather than the manual method we had suggested. So we decided to investigate. We had initially thought the geodata could easily be extracted from a file called metadata.xml that is supplied on AWS with the imagery, but it turns out that although that file does contain the geodata it is not the straightforward latitude and longitude of the images. Instead, the coordinates are supplied in the Universal Transverse Mercator coordinate system. There is also a lot of other information, such as the angle of the sun relative to the ground at any given point and the angle relative to the ground with which the satellite camera was viewing it.

In addition to the metadata.xml file, it turns out the ‘.jp2’ files also contain geodata in Geography Markup Language (GML), again using UTM for the coordinates. If you open the ‘.jp2’ files in a text editor you can see the GML data. There is also a file called tileInfo.json that again contains the coordinates in UTM format.

We decided it wasn’t worth the effort of trying to convert the UTM coordinates into latitude and longitude, as the KML file for determining tile codes already has all the information we need. So we made this JavaScript tool that accepts a tile code and creates a KML Ground Overlay with the correct coordinates and you can then open its properties in Google Earth and select the Sentinel image you have created with GIMP. Note that the corners will be correct, but we found that the imagery in other parts of the image may not line up exactly with Google Earth imagery. We believe GeoSage’s Spectral Transformer for Sentinel-2 Imagery is able to stretch the image using the information in metadata.xml for a more accurate result, but we could not confirm this as our trial licence has expired. For most casual uses, however, our method should be good enough.

Also of note is that the AWS files include a file called preview.jpg that is well worth checking before anything else, as you may find there is too much cloud cover, or the image doesn’t cover the part of the tile you are interested in, etc.

It is important to note that the Sentinel imagery has a resolution of 10 m per pixel, which is better than Landsat imagery but not as good as the high resolution satellite and aerial imagery available for most locations in Google Earth. So the main use of Sentinel imagery is for observing large scale events that are not yet visible in Google Earth. It is also good enough to see developments like road construction, deforestation or mining in areas where Google Earth has no recent imagery.

False Colour
It is also relatively easy to create false colour images. To do this, just download extra bands and substitute them when combining in GIMP. For example, one of the more popular false colour combinations is to use the near-infrared band B08 as Red, the Red band B04 as Green and the Green band B03 as Blue. This is a good combination for seeing fire scars. We tested it on the area around Lake Erskine, California the site of the largest, most destructive wildfire of the 2016 California wildfire season.


Copernicus Sentinel data, 2016.
1. The scar from the Erskine fire (blackened area).
2. and 3. show two other small fire scars.

Note that the other bands are lower resolution. See this page for details on the different bands.

Here is the same area done with band B8A, B11 and B12:

About Timothy Whitehead

Timothy has been using Google Earth since 2004 when it was still called Keyhole before it was renamed Google Earth in 2005 and has been a huge fan ever since. He is a programmer working for Red Wing Aerobatx and lives in Cape Town, South Africa.






PLEASE NOTE: Google Earth Blog is no longer writing regular posts. As a result, we are not accepting new comments or questions about Google Earth. If you have a question, use the official Google Earth and Maps Forums or the Google Earth Community Forums.

Comments

  1. I see why you like this – it’s fun isn’t it. First time I’ve had access to actually create false color.

    Just wondering. Any way to integrate your new javascript tool with their “sentinal-tiling-grid” kmz file to insert a “create overlay kml” button into their description popup?

    The whole process would then be almost painless. Or is that Idea undoable?

  2. Maybe try PostGIS, Qgis, GDAL, etc.



PLEASE NOTE: Google Earth Blog is no longer writing regular posts. As a result, we are not accepting new comments or questions about Google Earth. If you have a question, use the official Google Earth and Maps Forums or the Google Earth Community Forums.