4

I have a raster file (ECW format) that covers a very large area, however the contents comprise a thin strip of aerial imagery (100m strip centered over the rail line). The bounding box for the image is hundreds of kilometers in each direction.

When I load the image, the areas outside of the thin strip of aerial imagery show up as white, and obscure everything behind it.

Is there a way in QGIS to make the parts not containing the aerial image transparent, whilst still showing the image?

3 Answers 3

3

First of all I would place the raster as the bottom layer, then the white cells won't hide anything. If this is not an option try the layer Properties > Transparency tab. With the plus sign you can define color transparency for a specific color.

2
  • Using Kerstens approach largely solved the problem. However the "White" area values are all subtlety different, leading to patches of white ("clouds") still obscuring the plan. I found that the clouds could be significantly reduced by using the "Custom Transparency Options" under the Transparency panel, and using the "Add values from display" button to click on remaining white patches. In my case I added 6 extra options and it removed possibly 99% of the clouds without noticable changes to the raster
    – boberdorf
    Feb 12, 2015 at 5:57
  • If your clouds are all in a certain range of values you could use the raster calculator to change all these values to a single NoData value.
    – Kersten
    Feb 12, 2015 at 16:33
3

I'm guessing the areas with no imagery all have the same NoData value?

  1. right click on your layer and select "Layer Properties"
  2. go to "Transparency"
  3. top right "Additional No Data values"
  4. enter the value of the white areas
1
  • 1
    With the identify tool you can check out which values are stored in the parts that should become transparent.
    – AndreJ
    Feb 11, 2015 at 10:19
1

A blog entitled Help! My ECW has speckled edges! from Hexagon Geospatial covers this topic quite well because knocking out pixels is not a reliable solution.

If the ECW was created with an Opacity Band, QGIS would use this as an Alpha band.

If you received the rail corridor ECW image from a third-party data supplier, I would go back to them and ask that in future they generate the ECW's with an Opacity band.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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