NLT Landsat Processing Techniques

From World Wind Wiki

Revision as of 06:43, 23 May 2005 by 12.38.194.66 (Talk)
Jump to: navigation, search

Here's the process that we've used to create the first version of the NLT Global Landsat 7 Mosaic (Visible Bands)

- By Chris Maxwell (Lead Developer, NASA World Wind)


1. We first download Landsat7 scenes (the ones that are marked as "Earthsat") from the Global Land Coverage Facility

Remarks: The scenes come as a set of grayscale GeoTiff files for each row/path/date scene

2. Next composite 3 bands to create an RGB GeoTiff image. For "visible" Landsat, it's bands 1 (Blue), 2 (Green), 3 (Red)

Remarks: I used PixelSense for this as I didn't want to have to write the code to create GeoTiffs, but PixelSense did apply a linear clip contrast stretch, so I had to "replace" the image data after PixelSense outputted the RGB GeoTiff.

3. Next apply color enhancement algorithm to RGB Landsat GeoTiff

Remarks: The basic idea for the algorithm I used is to divide the image into a grid with each grid square being n by n pixels, where n is about 25 for a 30meter/pixel Landsat scene. For each square, find the least-squares for both the "high" and "low", and then save this information in order to later apply a linear stretch of the pixels in that square, weighting the R, G, B bands individually to the desired tastes. I found that generally, the source Landsat scenes have too much blue and red, and I weight the stretch to compensate for this for a more pleasing image. Next, use a cubic convolution to smooth out the stretch information in the grid squares. This is only applied to the information in the grid squares, not the actual pixel data. I did this 3 times for increased smoothness, but it seems that some areas still needed more smoothing. Next, stretch the pixels in each square according to the new grid stretch information. I tried to smooth the differences between the squares again by using bi-linear averaging (I think that's what to call it) for the grid squares that surround the current square being processed.

4. Re-project the Landsat image from UTM to Geodetic projection.

Remarks: I used GDAL for this. It's free, fast, and gives decent results.

5. Mosaic and re-tile Landsat scenes to regular Geodetic grid squares

Remarks: I used ERMapper for this, with the ESG Utilities add-on. The idea here is that the Landsat scenes overlap each other, so they must be stitched together before being re-tiled into gridded squares that correspond to Lat/Lon. I used grid squares that were 2.25 x 2.25 degrees, with a resulting image size of 8152 x 8152 pixels, which roughly equates to 30 m/pixel at the equator.

6. Build image pyramid

Remarks: I wrote a custom program for this, but basically it just splits the gridded tiles into smaller tiles, and names them appropriately for the World Wind naming scheme. After I split up the "source" gridded tiles, I resized all the tiles in the image pyramid to be 512 x 512 pixels.

7. Convert to JPG

Remarks: I wrote a program that basically is just a batch utility that utilizes GDAL to convert the Tiff files into JPG files with a 90% compression ratio. Nothing fancy.


Please feel free to put your comments about this page below 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197

Personal tools