I have a Google Earth KMZ file which shows ground movements after an earthquake, arranged into discrete classes:

enter image description here

From the KMZ file I'm able to download the original PNG images, which are multi-band (RGBA). I used the mosaic tool to create a single, seamless raster over my area of interest. I need to reclassify this image to match the legend above.

The problem:

The problem is that while there are 13 discrete classes in the legend, there is a far greater range of values in the mosaicked raster.

I believe this has occurred due to resampling and smoothing of the images (which occurred before the data provider gave them to me) which has resulted in interpolation between the known values. Here is a screenshot of the cells at close magnification:

enter image description here

For example, the yellow in the legend corresponds to RGB values of 255,255,0 but the yellows in the mosaicked raster vary considerably (eg 239,239,15 or 246,246,8, etc).

My question:

Is it feasible to "resurrect" the mosaicked image, and convert it into something approximating the values in the legend?

I realise that this approach isn't ideal, and that it would be far better to start with the original source dataset - but this isn't possible in this case.

  • you should be able to do some clever raster calculator syntax using the original 3 bands in a con... Con((Band1 > v) & (Band1 < w) & (Band2 > x) .... the painful part is finding the values for the ranges of red, green and blue. There should be distinct ranges for each of the 13 classes but only trial & error will give you the range... perhaps output a "fail" value and go looking for those cells to refine your ranges until no more "fail" pixels are generated. – Michael Stimson May 27 '14 at 5:00
  • I just remembered doing something similar many, many, many years ago to get all the "blue", "brown", "green" from a scanned printed map. I used Irfanview to convert into a 256 colour indexed tiff first and then just had to select from the colourtable eg: 25, 36, 99, 128 is blue. A lot of values to find but at least there was only one band. The result was then made monochrome and vectorized with 90%+ accuracy. – Michael Stimson May 27 '14 at 5:07
  • @MichaelMiles-Stimson thanks for these suggestions. It's kind of what I expected/feared and in fact I've been trying something similar. The difficulty is in deciding (eg) which of the "yellowish" cells above should be 0 and which should be -0.1 - I'm hoping for an algorithmic solution (eg, if 255,255,0 = -0.1 and 129,125,129 = 0, then calculate the value of 98,157,157, etc) – Stephen Lead May 27 '14 at 5:09
  • I'm also looking for someone with more experience in this area than I have, to tell me that whether is a good/terrible approach. I know that it'll be imprecise, but how can I estimate how inaccurate the result will be? It's an educated guess at a value which is itself interpreted, based on a resampled image. – Stephen Lead May 27 '14 at 5:15
  • 1
    In the end you've got 3 choices: Do your best at what you've been doing and use the output, use the RGB and put the panel in the maps (not good for analysis) or not use the data at all. It is a good approach and I would expect that you would get high enough accuracy to get working results that you could use with confidence. Have you considered some of the classification techniques used by ERDAS or ENVI? That might work but it is quite fractional for that or dynamic segmentation. – Michael Stimson May 27 '14 at 5:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.