Showing posts with label tuiview. Show all posts
Showing posts with label tuiview. Show all posts

Saturday, 29 April 2017

Some nice clear satellite images of Cornwall with Landsat 8 and Sentinel 2

The launch of Sentinel 2A and 2B as part of the European Space Agency's Copernicus Program, has increased the frequency with which medium resolution satellite imagery in optical and near infrared is available.

Landsat 8 (and 7) are also still operating, which take a given frame every 16 days each.

Landsat 7 unfortunately has a scan line corrector fault that means there are stripes of missing data:

There was a particularly cloud free image of Cornwall on Landsat 8 on 27th March 2017, which I show below, displayed using tuiview.

On the left is a visible light band combination using bands 2, 3 and 4 which are broadband blue, green and red bands, and on the right I use band 7 (which is known as SWIR2, which stands for short-wave infrared 2, at around 2.2 micrometres wavelength), band 5 (near infrared), and band 4 (red, but shown as blue here). Infrared bands can be a bit confusing, especially if you have been exposed to both terrestrial remote sensing and astronomers terminology.

A somewhat closer view, with Truro at the top-right, showing Falmouth, the Fal estuary, Camborne and Redruth, and Stithians Reservoir in the centre.
Sentinel 2 has also captured some good clear images recently in the area, such as this. These are processed in the Sentinel 2 Toolbox within the Sentinel Application Platform, using sen2cor to process to Level 2A (surface reflectance)

This is from 18th April 2017, with a clear view of parts of Cornwall.
Sentinel 2 also took a mostly clear (apart from some high cloud) image on 27th March 2017:


The top image uses bands 2, 3 and 4 for the blue, green and red channels respectively, and the bottom uses 2, 8 (842nm) and 12 (2190nm).
Since the different bands are at different resolutions, when using the Sentinel Application Platform it is necessary to resample the output under the Raster menu, to process it further. This can produce a very large file, so I used the GeoTIFF / BigTIFF option because otherwise it would produce a file larger than a standard GeoTIFF file can be, when the 10m resolution is used. This can then be converted to a .KEA file for a smaller file size with gdal_translate.

The reason the file size is enormous is the output from resampling has 45 bands, because although it outputs only 10 data bands, that is 2, 3, 4, 5, 6,7 ,8 , 8a, 11 and 12, there are also atmosphere optical depth, water vapour, cloud probability, snow probability, and a scene classification, and then bands describing zenith angle, solar angle for every bands. As an uncompressed GeoTIFF this was 22 gigabytes for each tile, but is less than 1GB as a KEA (and I selected only the first 15 bands using rsgislib).
Four Sentinel 2 tiles combined (UUA, UUB, UVA, and UVB) to provide an overview of Cornwall and Devon - with border overplotted in QGIS - visible light

Using Band 12 = red, Band 8 = green and Band 2 = blue.
I have also opened them in QGIS and overplotted a map based on OpenStreetMap:

Sentinel 2 - 18th April 2017 - visible light
Sentinel 2 - 18th April 2017 - Band 12 (2.2 μm), Band 8 (842nm), and Band 2 (blue).
Landsat 8 - 27th March 2017 - Bands 4 3 and 2 (visible light)
Landsat 8 - 27th March 2017 - Bands 7, 5 and 2


Sentinel 2 - 26th March 2017 - visible light


Sentinel 2 - 26th March 2017 - Bands 12, 8, 2

Another possible band combination of the 18th April image, which is visible light but with the red and green channels swapped, and blue stretched a bit further to attempt to see the bluebells in the woodland shown from Sentinel2. The location is just to the right of the gridlines crossing at 183000, 41000





I will blog again about some of these when I have some time to experiment with processing. I have used the Sentinel 2 Toolbox and sen2cor to process the images, but I would also like to try ARCSI for processing from Level 1C to surface reflectance for Sentinel 2.



Monday, 16 June 2014

Digital Terrain Model layerstack on Mars

I've begin to look at topographic analysis on Mars. Here's a HiRISE digital terrain model, with red coloured for higher elevations, green for steeper slopes, and blue for aspect.

This one is a Lineated Valley Fill in Deuteronilus Mensae.

Data from HiRISE website (NASA/JPL/University of Arizona/USGS) processed in GDAL and shown in Tuiview.



Edit - Importing into QGIS, showing the scale using a grid (units are in metres):
The elevation range is from -2681 to -1997 metres relative to Mars datum, and I've coloured slope in the range 0-30 degrees, and aspect 0-180 deg away from N.

Saturday, 14 June 2014

Object-based segmentation of topography with RSGISLib

The RSGISLib (Remote Sensing and GIS) Python library written by Pete Bunting and Daniel Clewley provides a number of features, among them segmentation of images to objects.

This can not only be applied to what one conventionally thinks of as images, but also topographic layers. I thought I'd practice this on Earth first before trying to do this for Mars as I will be for my dissertation.

Using Space Shuttle Radar data (freely available - I got it via the program Viking) I obtained the elevation of the British Isles (excluding Shetland) and using GDAL via QGIS and the command line, created slope and aspect layers. I then transformed the aspect to remove the discontinuity at 360-0 deg, using degrees from N, so that 180 is south facing, east and west are both 90 etc.

Using RSGISLib it is possible to segment to objects. Here I show some results of doing so, using a layerstacked image with elevation, slope and angle from N. I have set the minimum connected object size to 1000 pixels. With the topographic data gridded at 73m, this means objects about 5.5 sq. km or larger.


Visualisation is a gaussian stretch in TuiView, setting red to aspect, green to slope, and blue to elevation, showing mean values for each segment.



Now I show a few of the actual segments without the values, with colours assigned in RSGISLib for visualisation. It is possible to populate a Raster Attribute Table to add data to the segments for a land cover classification.

From the Isles of Scilly to the Isle of Wight:
Wales, and central England.
 Zooming in to mid Wales:

By changing the object size, it is possible to do this at different scales. This is part of the segmentation for a minimum object size of 16384 pixels (that is about 89 sq. km) equivalent to a square 9.5km a side:

The thing that makes geospatial data interesting is how what you see in it changes depending on what scale you look at it and how you visualise it.