I am using FME to convert ESRI Raster Dataset orthophotos to an .ecw file and there are some very ugly black pixels added to the border.
Hi @carlpreusser,
This article will help get you started with removing the black borders:
This article will help with .ECW specifics, it works with GeoTIFF data but should still work for Esri rasters:
If those don't work for you, could you share your workspace so the community can help you further.
-Liz
Hi @lizsanderson,
Here is my workspace:
workspace.png
Here are the properties of the Reader:
readerproperties.png
Here are the Writer properties:
writerproperties.png
I tried this same workspace without the RasterBandNoDataRemover transformer and just the Reader->Writer and I still get the same black pixels added.
Here is the starting raster:
originalimage.png
Here is the ECW result:
blackpixels.png
I am not sure why these pixels are being added, they aren't in the original raster. Any thoughts?
Hi @lizsanderson,
Here is my workspace:
workspace.png
Here are the properties of the Reader:
readerproperties.png
Here are the Writer properties:
writerproperties.png
I tried this same workspace without the RasterBandNoDataRemover transformer and just the Reader->Writer and I still get the same black pixels added.
Here is the starting raster:
originalimage.png
Here is the ECW result:
blackpixels.png
I am not sure why these pixels are being added, they aren't in the original raster. Any thoughts?
Thanks for supplying the screenshots. I'm not sure why it's making those lines but you can try using the RasterSelector (with default parameters) and then the RasterBandNoDataSetter with the Nodata Value set to 0.
Let me know if that works for you.
-Liz
Thanks for supplying the screenshots. I'm not sure why it's making those lines but you can try using the RasterSelector (with default parameters) and then the RasterBandNoDataSetter with the Nodata Value set to 0.
Let me know if that works for you.
-Liz
It doesn't seem to be anything to do with the original image or nodata cell replacement. FME is seemingly adding the black pixels to the final image.
If anyone has any suggestions, literature, or insight I would appreciate the help!
It doesn't seem to be anything to do with the original image or nodata cell replacement. FME is seemingly adding the black pixels to the final image.
If anyone has any suggestions, literature, or insight I would appreciate the help!
Thanks
I suspect the problem is coming in because there may be two values of 'NoData' coming in from the reader. I've seem problems like this in the past. When performing a resample of the data this is where the issues can arise. Are you reprojecting at all in the worklow? We may be resampling upon write also.
Check out the values of the cells in FME Data inspector where the black cells appear just after the raster has been read into FME.
Also check out the reader parameter 'Nodata Handling for Managed Rasters' By default this is set to add an alpha band and set transparency on the image where the original 'NoData' parts of the image were. When re-sampling some cells may be changing values which are not covered by the alpha mask. This makes them appear visible.
You can try and see what changing this setting to 'None' does to see the difference in how the image is read in to FME.
The trick will be making all of the cells around the data you care about to have all the same cell value.