Files
-
- 10 KB
- Download
Introduction
In this exercise, we will read Landsat-8 data and provide tips for reading large satellite datasets.
When reading satellite image formats, the FeatureReader is typically a better option than the traditional readers. Imagery providers have vast global datasets, and reading them with traditional readers requires entering the coordinates of a bounding box, which is not very convenient. With the FeatureReader, we can use a feature's geometry to initiate reading of a particular area, which is much easier.
Landsat has multiple bands in different spectral ranges. Each band is stored separately. Bands 2, 3, and 4 represent Blue, Green, and Red, respectively. Band 8 is a panchromatic image (grayscale) and can be used for pansharpening (increasing the resolution of the lower-resolution color bands). Here is the documentation on using Landsat-8 with the AWS reader.
Step-by-step Instructions
1. Create a Search Envelope
To pull a satellite image from a specific location, we can create a search envelope. Add a Creator to the canvas and then add a 2DBoxReplacer. The 2DBoxReplacer uses the maximum and minimum x and y coordinates to create a box. In the parameters, set the following:
- Min X Value: -123
- Min Y Value: 49.1
- Max X Value: -123.25
- Max Y Value: 49.3
Optionally, you could create published parameters for each of these values or use values for another location on Earth. These values are for Vancouver, Canada.
2. Set the Coordinate System
If we were to run the workspace right now, the values we enter into the 2DBoxReplacer don’t have any real meaning without a coordinate system attached, so let’s fix that. Add a CoordinateSystemSetter to the canvas and connect it to the 2DBoxReplacer. In the parameters, set the Coordinate System to LL84, which is a latitude/longitude coordinate system.
3. Add a Landsat-8 on AWS Feature Reader
Add a FeatureReader transformer to the canvas and connect it to the CoordinateSystemSetter. In the parameters, set the Format to Landsat-8 on AWS, then click on Parameters.
In the parameters, disable the Worldwide Reference System. Since we are using a search envelope, we don’t need to use the Landsat Worldwide Reference System (WRS). If you would like to use this filtering feature, see Landsat’s documentation. Next, set the Maximum Percent Cloud Cover to 60. Then expand Schema Attributes and for Additional Attributes to Expose, select fme_basename. Click OK once.
Back in the Landsat-8 on AWS Feature Reader parameters, click on the ellipsis for Feature Types to Read and select Preview_Large. This will return a preview of the Landsat image with all of the bands. After you have found the image you wish you use, you can add additional bands of interest. Next, set the Spatial Filter to Bounding Boxes OGC - Intersection; this will use the box we created with the coordinates to filter out the Landsat images from AWS.
4. Run the Workspace
Run the workspace with Feature Caching Enabled, then view the Preview_Large output port. Depending on the day, the results may vary for what images you get back. You can change the cloud cover tolerance or the date if you are not getting any results.
This particular workspace run returned four Landsat images, highlight the one of interest, then in the Feature Information Window, copy the fme_basename.
5. Test for fme_basename
Add a Tester to the canvas and connect it to the Preview_Large output port on the FeatureReader. In the parameters, create the test: fme_basename = <landsat file name>
Now, continue your workspace however you wish using the selected Landsat image.