Solved

Error clipping raster data with polygon shapefile

  • 29 August 2017
  • 9 replies
  • 20 views

Badge

Hello,

I have a lot of rasters to clip with a single polygon shapefile. As always, I use the 'clipper' function in FME in a simple workspace. But I am unable to clip the data, FME gives me the following error message:

MaskCombiner(RasterEvaluationFactory): Failed to parse the EXPRESSION_LIST clause. The provided value was 'if(B[0]==255,A[0],nan);if(B[0]==255,A[1],nan);if(B[0]==255,A[2],nan);if(B[0]==255,A[3],nan)'. Please ensure that your syntax is correct

I am guessing that something is wrong with the nodata value in my tiff files? How do I fix this issue in FME?

Thanks!

icon

Best answer by courtney_m 29 August 2017, 16:43

View original

9 replies

Badge +1

Interesting, did you try to use RasterBandNoDataSetter before clipping

Userlevel 2
Badge +17
Are there some transformers that manipulate raster features, other than the Clipper? If you posted the workspace or its screenshot, it could help us to find the issue.

 

 

Badge
Are there some transformers that manipulate raster features, other than the Clipper? If you posted the workspace or its screenshot, it could help us to find the issue.

 

 

@takashi: No, the workspace is as easy as it gets: read in the multiband geotiff, clip using an ESRI shapefile (with one polygon), and write as a multiband geotiff in a different folder. There are no other operations. Both datasets have the same projection, too, and can be opened in QGIS with no problems.

 

 

Badge +1
@takashi: No, the workspace is as easy as it gets: read in the multiband geotiff, clip using an ESRI shapefile (with one polygon), and write as a multiband geotiff in a different folder. There are no other operations. Both datasets have the same projection, too, and can be opened in QGIS with no problems.

 

 

can you maybe provide data sample?
Badge

As @zzupljanin, mentioned, you can try adding a transformer before clipping. Another option would be the RasterBandNoDataRemover or the RasterInterpretationCoercer. If you can attach your workspace and sample data, I can try this out.

Userlevel 4
Badge +25

Looks like this is a known issue (PR#77325). Where the nodata is set to NaN (Not a Number) then there is a problem. As others have suggested, using a RasterBandNoDataSetter to change the Nodata value to an actual number is a good workaround.

If you need to follow up on this, contact our support team and let them know it is related to PR#77325

Badge

As @zzupljanin, mentioned, you can try adding a transformer before clipping. Another option would be the RasterBandNoDataRemover or the RasterInterpretationCoercer. If you can attach your workspace and sample data, I can try this out.

Using RasterBandNoDataRemover solved my problem, thanks @courtney_m!

 

Userlevel 4
Badge +25

Looks like this is a known issue (PR#77325). Where the nodata is set to NaN (Not a Number) then there is a problem. As others have suggested, using a RasterBandNoDataSetter to change the Nodata value to an actual number is a good workaround.

If you need to follow up on this, contact our support team and let them know it is related to PR#77325

fyi It's been fixed in FME2018 (beta build 18170 or greater)

 

Userlevel 2
Badge +17

The issue with the Clipper that was causing this problem has been fixed in FME 2018, which can be downloaded from www.safe.com/download.

Reply