I've managed to successfully run python-fmask, producing an output .img file (please see #2 for my issues with creating output in another format). However, the final application I will be using it in does not support .img files, so I have tried to convert it to a GeoTIFF file using gdal_translate.
However, looking at the output image I find that it is a RGB image showing the FMask classes as different colours. I would like to get this output as a more 'standard' FMask output, without the colour palette or RAT...just raw digital numbers as in the original FMask.
I've tried playing around with the various options to gdal_translate, and I've had a brief look at the python-fmask code, but I can't quite see how to get this working.
Original comment by Sam Gillingham (Bitbucket: gillins, GitHub: gillins).
It isn't an rgb image, but a thematic image with a raster attribute table. So the numbers are in there. Can I suggest viewing with software that properly sports RAT s like tuiview?
Original report by Anonymous.
I've managed to successfully run python-fmask, producing an output .img file (please see #2 for my issues with creating output in another format). However, the final application I will be using it in does not support .img files, so I have tried to convert it to a GeoTIFF file using gdal_translate.
However, looking at the output image I find that it is a RGB image showing the FMask classes as different colours. I would like to get this output as a more 'standard' FMask output, without the colour palette or RAT...just raw digital numbers as in the original FMask.
I've tried playing around with the various options to gdal_translate, and I've had a brief look at the python-fmask code, but I can't quite see how to get this working.
Any ideas?