Skip to main content
Solved

Error clipping raster data with polygon shapefile


wolters
Contributor
Forum|alt.badge.img+6

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!

Best answer by courtney_m

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.

View original
Did this help you find an answer to your question?

9 replies

zzupljanin
Contributor
Forum|alt.badge.img+4
  • Contributor
  • August 29, 2017

Interesting, did you try to use RasterBandNoDataSetter before clipping


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • August 29, 2017
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.

 

 


wolters
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • August 29, 2017
takashi wrote:
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.

 

 


zzupljanin
Contributor
Forum|alt.badge.img+4
  • Contributor
  • August 29, 2017
wolters wrote:
@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?

courtney_m
Contributor
Forum|alt.badge.img+5
  • Contributor
  • Best Answer
  • August 29, 2017

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.


mark2atsafe
Safer
Forum|alt.badge.img+43
  • Safer
  • August 29, 2017

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


wolters
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • August 30, 2017
courtney_m wrote:

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!

 


mark2atsafe
Safer
Forum|alt.badge.img+43
  • Safer
  • September 15, 2017
mark2atsafe wrote:

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)

 


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • October 12, 2017

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


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