Skip to main content
Solved

Is it possible to retrieve the NoData property/value from a geotiff file?

  • March 3, 2021
  • 8 replies
  • 269 views

aguan
Supporter
Forum|alt.badge.img+11
  • Supporter
  • 140 replies

We have many geotiff files that have NoData Value specified or calculated in ArcGIS. Is there a way in FME to retrieve the NoData Value from the tiff's property?

Best answer by markatsafe

@aguan​ RasterBandPropertyExtractor should return the no data value on each band in your raster

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

8 replies

Forum|alt.badge.img+2
  • 1891 replies
  • Best Answer
  • March 3, 2021

@aguan​ RasterBandPropertyExtractor should return the no data value on each band in your raster


aguan
Supporter
Forum|alt.badge.img+11
  • Author
  • Supporter
  • 140 replies
  • March 3, 2021

@aguan​ RasterBandPropertyExtractor should return the no data value on each band in your raster

@markatsafe, yes it is. I have two single band rasters. One has NoData value of 15, and the other is empty. The transformer retrieves the 15 from the first raster, but gives 2 for the second, which is strange. If I calculate the value for the second one in ArcGIS Pro, it gives a value of 16. Then the FME also gives the 16. So my question is why it gives 2 if NoData value is initially empty?


Forum|alt.badge.img+2
  • 1891 replies
  • March 3, 2021

@markatsafe, yes it is. I have two single band rasters. One has NoData value of 15, and the other is empty. The transformer retrieves the 15 from the first raster, but gives 2 for the second, which is strange. If I calculate the value for the second one in ArcGIS Pro, it gives a value of 16. Then the FME also gives the 16. So my question is why it gives 2 if NoData value is initially empty?

@aguan​  If you can attach the problem raster or file a support case with your local FME Support provider then someone would be able to take a look.


aguan
Supporter
Forum|alt.badge.img+11
  • Author
  • Supporter
  • 140 replies
  • March 4, 2021

@markatsafe, yes it is. I have two single band rasters. One has NoData value of 15, and the other is empty. The transformer retrieves the 15 from the first raster, but gives 2 for the second, which is strange. If I calculate the value for the second one in ArcGIS Pro, it gives a value of 16. Then the FME also gives the 16. So my question is why it gives 2 if NoData value is initially empty?

@markatsafe, see attached tif zip file. The NoData property is empty. I ran the RasterBandPropertyExtractor on it, it gave NoData value of 2.


caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • 571 replies
  • March 4, 2021

@markatsafe, yes it is. I have two single band rasters. One has NoData value of 15, and the other is empty. The transformer retrieves the 15 from the first raster, but gives 2 for the second, which is strange. If I calculate the value for the second one in ArcGIS Pro, it gives a value of 16. Then the FME also gives the 16. So my question is why it gives 2 if NoData value is initially empty?

Inspect the tiff you just uploaded. You will see that it has Nodata Value: 2 set on Band 0 (GRAY8) and the _band{0}.band_nodata attribute extracted via RasterBandPropertyExtractor is 2.

I also connected a Raster Statistics Calculator, .min and .max are 0 and 9. So I don't know where you get the 16 from.


aguan
Supporter
Forum|alt.badge.img+11
  • Author
  • Supporter
  • 140 replies
  • March 4, 2021

@markatsafe, yes it is. I have two single band rasters. One has NoData value of 15, and the other is empty. The transformer retrieves the 15 from the first raster, but gives 2 for the second, which is strange. If I calculate the value for the second one in ArcGIS Pro, it gives a value of 16. Then the FME also gives the 16. So my question is why it gives 2 if NoData value is initially empty?

@caracadrian​ @Mark Stoakes​ I probably did not make my issue clear. I am attaching he screen captures of the NoData value property of this raster in ArcGIS Pro. Initially it is empty, but FME RasterBandPropertyExtractor gives 2. In Pro, using the NoData Editor compute gives a value of 16, and then FME RasterBandPropertyExtractor gives 16 too. I don't care how Pro gives 16. When Pro calculates stats, it ignores NoData value, so the NoData value can be totally outside the (min,max). My concerns is why FME gives 2 while ArcGIS Pro shows it is empty. I would hope FME gives a null NoData value too.


Forum|alt.badge.img+2
  • 1891 replies
  • March 4, 2021

@aguan​ FME reads the nodata value from the TIFF image file = 2 . Esri reads the nodata value from the .tif.xml, which in this case is 15 - <NoDataValue Sync="TRUE">15</NoDataValue>


aguan
Supporter
Forum|alt.badge.img+11
  • Author
  • Supporter
  • 140 replies
  • March 5, 2021

@markatsafe, ignore .tif.xml. It was a manual entry in Pro's metadata editor. I should not have sent it in the zip file to confuse you. Anyway, I am not worry about now. We have decided not to use FME to read NoData Value property of the tif file, but manually enter it in the metadata editor, and export it to .tif.xml file and retrieve it from there.