Skip to main content
Question

How to write geotiff numerical raster with int8 data type and a nodata value of -128


philipwhitten
Supporter
Forum|alt.badge.img+13

I have generated a raster that has integer data values between 1 and 6 and needs a nodata value.  

As the RasterInterpretationCoercer has a “Data Interpretation Type” of “Int8” I thought my task would be as simple as:

  1. Use the “RasterBandNodataSetter” to set the Nodata Value of -128.
  2. Use the “RasterInterprationCoercier” with the Data Interpreation Type of “Int8”.
  3. Use the GEOTIFF writer to output a tif file.

When I try this type of workflow and then use FME to read the generated tif file, I find that the raster band is written with the type Uint8 and that my data value has been changed to 128.  I am using FME 2025.0.3.

Is it possible to get the GEOTIFF writer to write raster data with the datatype of int8 and a negative Nodata value?  If not, which raster types in FME will allow this?

4 replies

takashi
Evangelist
  • June 20, 2025

Hi ​@philipwhitten ,

In my quick test, I wasn't able to reproduce the issue. Could you please take a look at the attached workspace example and see if there are any different conditions from yours?


philipwhitten
Supporter
Forum|alt.badge.img+13

Thanks so much ​@takashi.  I have downloaded your workspace and I agree that your output is what I want to achieve.  I am going through all of my settings, but haven’t yet isolated which detail is giving me the unwanted behaviour with my original workspace. 

For reasons that I don’t yet understand, not only is my data ouput uint8 instead of int8, but, my output file also has a pallete which I know shouldn’t be there - and I know that palletes can’t work with int8.  I have attached my current workspace and could provide some cut down input raster files if necessary.

For my workspace, this is what FME is telling me when I read the generated tiff file (note uint8 and pallete):

 

This is the raster attributes immediately before the GEOTIFF writer (note int8 and no Pallete):

 


philipwhitten
Supporter
Forum|alt.badge.img+13

I have worked out the cause was in the GEOTIFF feature writer’s Advanced parameters.  I had the “Photometric Interpretation” = “MinIsWhite”. When I change this setting to “Auto” I get the int8 datatype that I want.


takashi
Evangelist
  • June 20, 2025

Good to hear the issue has been resolved. Cheers!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings