# How to remove abnormalities from the Green vegetation fraction

Study area was clipped by using the shape file from Band 3 and Band 4. First, Band 3 and Band 4 were converted to at-satellite brightness temperature by using the built-in function in semi-automated tool in QGIS (semi-automatic classification plug-in). NDVI was calculated by b4-b3/b4+b3 in landsat 5 images, the range of NDVI was 0.0968299 - 0.433846. Green Vegetation fraction were also needed to examine the role of vegetation in mix land cover that was derived from the equation:

`GVF = NDVI - NDVImin / NDVImax - NDVImin`

but the problem here was as you would see the range of the fraction is -0.631684 - -0.0011024) that is due to some abnormalities in the data that don't know how to remove it. Is there something wrong in "NDVI" values as there is no data values (no data values = -3.4020 + 38) by seeing the properties of image in QGIS. I have taken the NDVImin and NDVImax as 0.0968299 and 0.433846 respectively but literature has shown that the values 0.05 and 0.70 as NDVI threshold values that were derived by global Advanced Very High Resolution Radiometer (AVHRR) 10-day composite data (Zeng et al. 2000).

## migrated from meta.gis.stackexchange.comOct 21 '14 at 10:46

This question came from our discussion, support, and feature requests site for cartographers, geographers and GIS professionals.

• This question seems to have been posted on Meta GIS by accident so I have migrated it to Main. – PolyGeo Oct 21 '14 at 10:48
• It looks like your no data value is affecting the calculation. You need to make sure the no data values are not included in the calculation. Need more information about your problem, data, and calculation method to provide a better answer – khafen Oct 21 '14 at 13:43

## 1 Answer

Given the forumla:

GVF = (x - min) / (max - min)

(Notice the brackets.) It is impossible for the values to be outside the range 0 - 1 for all values of x between min and max, which by definition it is. In fact, it should occupy the full range from 0 - 1. So we can conclude that either your min and max values aren't representative of the actual range of values in the image (e.g. if you used the display min and max values used to scale the palette rather than the actual data min and max) or else that there was a mistake in the form of the equation when you entered it. Solving for x, we get:

x = GVF * (max - min) + min

Substituting in your minimum and maximum output values (-0.631684 and -0.0011024) we get a range of input values from -0.116057778 to 0.096458373. You'll notice that that upper range value is actually within three significant digits of your stated minimum value. (Coincidence? Possibly.) However, a range of NDVI values in an image from -0.116057778 to 0.096458373 does seem unlikely and you can confirm if this is the case by performing a histogram analysis on the image. It is much more probable to me that you simply had mixed up the equation slightly. Was it in the Raster Calculator that you performed this analysis? Given you dropped out the brackets in the equation in your question, I explored various combinations of missing brackets and wasn't able to come up with a form that would replicate your output range. I did find that the equation:

OUT = (x - max) / (max + min)

for your input min value (0.0968299) resulted in the output value -0.635069541, which is very similar to your stated output minimum value. Unfortunately it won't give you your output max value, so that wasn't it...but it's likely some similarly mis-typed equation resulting from substituting + for - or leaving out a bracket here or there.

Note that the error is unlikely to be the result of a NoData value, as has been suggested, since 1) NoData values are generally very large negative values that would result in an output far outside the small negative values found in your output range, and 2) NoData values should really be ignored by any GIS that utilizes the construct.

• I am following the research paper link_itlic_ bold 'code' and equatin 8 and want to make the graph as in figure 4 in this paper. – Waseem Ali Oct 22 '14 at 4:52
• Very nicely detailed answer! I'm always surprised to see what various analytics can be applied to rasters. – Joseph Oct 22 '14 at 11:30
• @WaseemAli Yes, eq. 8 is equivalent to my first equation, i.e. the brackets are implied in the two-line form of the equation. You must perform the two subtractions before the division. Nonetheless, you still could not use this equation and get values in the range -0.63 to -0.001. Either your min and max values are incorrect or your usage of the equation was incorrect. I'd just double check both and see where you went wrong. These kinds of mistakes happen all the time during an analysis ;) – WhiteboxDev Oct 22 '14 at 12:29
• @WhiteboxDev, May be I was unable to explain of my question, I have derived NDVI map of same area of years 1992, 1998, 2002, 2010 but the ranges of every years representing 0-0.33, 0-0.45, 0-0.33, 0-.32, 0-0.30 respectively are different, how can I make them normalize into the same range so that I could see the difference of each successive images. – Waseem Ali Oct 23 '14 at 14:38
• @WhiteboxDev. I have append some information in my another post, you can view it the data and my requirement there please.link – Waseem Ali Oct 24 '14 at 7:41