Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Maybe i'm missing a basic concept when it comes to manipulating/removing values from an RGB orthophoto mosaic. Is it possible to completely eliminate the collar (black background) from an orthophoto mosaic that is in an ECW format. I was able to do in a TIFF format but the file needs to be in an ECW format as it is very large. I've had limited success, using FME, to accomplish this but the resultant file always has areas that are not removed. Hope all this make sense.

I'm open to other formats that will work, but as long as it performes to the same level as an ECW.

I have access to FME and ArcInfo.

share|improve this question
I am trying to do the same. Replacing the collar around an .ECW file. Kan you send me the FME workbench. Thanks, –  Cecília Apr 16 '13 at 13:05
add comment

3 Answers

up vote 5 down vote accepted

This is a limitation of the ECW format (with earlier versions of the SDK versions, <= 3.3 I think) which doesn't support NoData values or Alpha transparency. The lossy compression makes it even harder to remove the collars as the black values aren't exactly RGB 0,0,0 but vary.

To get rid of the collar you'll need to mask/clip the collar and convert the image to another format that does support NoData values, mask bands or Alpha transparency. You can use ECWs compressed using the latest version of the ERDAS ECW/JP2 SDK (but you'll need recent ERDAS software to do this) or JPEG2000.

There are a few ways to remove the collar, I tend to either draw a polygon around the "good" data and clip with that or use the GDAL nearblack utility.

share|improve this answer
Thanks for the response. Yes, the problem is that the black, well ... isn't all that black, but varies from 0 to 6 (in my case). I have tried JPEG2000, and although compresion sizes are similar, rendering performance is far superior with an ECW format. Does MrSID support no data? –  dchaboya Jan 27 '12 at 21:56
MrSID has the same problem with the version of the format (GEN3) supported by ArcGIS 10.0, although MrSID GEN4 does support alpha bands. According to this thread, MrSID GEN4 support is targeted for the ArcGIS 10.1 release. –  blah238 Jan 27 '12 at 22:44
The GDAL nearblack utility is exactly for the case that the border is not perfectly black. Wit-color c1,c2,c3...cn: (GDAL >= 1.9.0) you can search for pixels near the specified color. –  markusN Jan 28 '12 at 8:21
I'll try the nearblack utility. So it appears that all lossy compression formats don't support nodata. Can anyone briefly explain the reason behind lossy compressions not being capable of supporting nodata. –  dchaboya Jan 28 '12 at 19:34
add comment

ECW since 2010 has supported alpha transparency that removes what you refer to as "collars". This is a legacy limitation in ECW v3 files only.

ECW v4 files are written automatically by all ERDAS software tagged 2010 and above which includes Imagine and ERMapper. Third party products that use the v4 SDK may support writing or certainly reading this file version (reading is provided free of charge for desktop apps). I do not know off-hand if FME 2012 have updated their ECW support

Note: The ECW format versions are backwards compatible. If you have an ECW v4 file with an alpha band defined but are reading with an application using the v3 SDK, the additional band will simply be ignored. Check the erdas.com website for some free ECW plugins, specifically for your ArcInfo license that will add ECW v4 support

Unfortunately the prevalence of v3 compressors has meant many people assume the limitations remain and is somehow a limitation of wavelet formats. This is not certainly not true


share|improve this answer
add comment

There are ways to manipulate FME 2012 to remove the collar. It is a complicated process and too much to type here. One quick way to show how it can be done is to use the RasterExpressionEvaluator and the expression


Where MAXPIXVALUE is a user parameter set to the max pixle value to be considered black. In my case it was around 8. The expression searches each pixel and band. If any one band has a value less than than the MAXPIXVALUE specified it considers that cell to have no data. If the pixel value is say 9,8,8 it will leave the pixel as is because one band is higher than the specified value.

In my scenario, I used the expression to create a shapefile that fit the imagery exactly and clipped the original ecws to the shapefile created by the expression.

share|improve this answer
Excellent. Will give this a try. I'm suspecting that this operation will take some time to complete on a large dataset. –  dchaboya Oct 30 '12 at 15:14
Yes. Very much so. My data sets run anywhere from 2- 2000 ecws and the workbench runs on average 2-48 hours. –  Zack Gilbert Oct 30 '12 at 16:42
I'm getting an error when trying to run it (probably not setting it up correctly). So I replaced MAXPIXVALUE with the max value I want to replace, like so (2). Now, I'm not sure how to use the ports. Any suggestions? –  dchaboya Oct 30 '12 at 21:31
Im not sure. I would need to look at the workbench and see. Email me your workbench with the log file from the last time you ran it. I will see what I can do with it. –  Zack Gilbert Oct 31 '12 at 17:07
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.