While printing out the raw pixel values of a GEOTIFF land cover tile I found 90 % of pixels have normal values i.e. those that the documentation describes (8 bit integers describing a land cover type). However several raw pixel values have been found to be zero. From this link - http://eoedu.belspo.be/en/guide/postclas.asp?section=3.8 I presume this means that they are unclassified.Has anyone performed these post-classification techniques such as modal filtering using their own code or other software so that these unclassified pixels do get 'attached' to some land cover type ? If necessary I can upload an image of the necessary GEOTIFF file.

  • 1
    Can you be more specific on what data you are using? 0usually means NoData and pixels classified as such should be excluded from further calculations. – Kersten Jun 1 '15 at 9:31
  • I like the latest revision of your question much more. – PolyGeo Jun 2 '15 at 1:26
  • If 0 means nodata, then it's nodata. As in when originally produced, for whatever reason they could not determine the landcover for that pixel (cloud cover, sensor error, lack of source data, etc.). You can convert those pixels to one of the classes in a number of ways - neighborhood stats or Euclidean fill, etc. Since it's categorical and not value, that has to be considered in selecting a method. But to do so basically means you're making up data (if they could fill the gaps they probably would have). Only you and your analysis purpose can determine if this is acceptable or appropriate. – Chris W Jun 2 '15 at 1:44

There are three main reasons to flag a pixel as NoData in a classified image :

1) No input data : remote sensing dat could be missing for several reasons, including cloud, cloud shadow, temporary snow cover, darkness, sensor dysfunctionning,

2) Insufficient information : there was a valid value for the pixel, but not enough information to classify it.

3) No output class : the classification system is not complete for the area of interest, so that a pixel cannot be assigned a class (e.g. a pixel covered by solar panels might not fit into the categories of a map designed 20 years ago or sea water might not be included in a terrestrial habitat map...). Gap filling doesn't help in this case, except if you know the missing class.

As mentioned by @Chris W, gap filling is a dangerous process, especially when you cannot take advantage of spatial autocorrelation, because you simply guess some values with a very limited number of information. Your suggestion to use modal filter is not a bad one, but it was initially designed for the removal of salt and pepper effect and might smooth your data, so you should only use the filtered value where you have nodata pixel. You can design more specific decision rules based on the neighborhood if you have expert knowledge about your area of interest (e.g. river pixels must be connected, holes inside crop fields are rare...). However, the best way is to try filling the gaps with another map if available (e.g. Open street map, global forest map, lower resolution global maps, etc)

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.