You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This makes all image pixels with 0,0,0[,0?] set as nodata, which makes them transparent when rendered. The issue is that there are some places in the original imagery that are so heavily shaded that they actually have pure-black values. For example, this is the original image with correct colors:
The text was updated successfully, but these errors were encountered:
I want all areas with source data to have full opacity, and I want all areas with no original NAIP image to be fully transparent.
If you actually read through the gdalbuildvrt options, you'd see:
-b <band>:
Select an input to be processed. Bands are numbered from 1. If input bands not set all bands will be added to vrt. Multiple -b switches may be used to select a set of input bands.
-addalpha:
Adds an alpha mask band to the VRT when the source raster have none. Mainly useful for RGB sources (or grey-level sources). The alpha band is filled on-the-fly with the value 0 in areas without any source raster, and with value 255 in areas with source raster. The effect is that a RGBA viewer will render the areas without source rasters as transparent and areas with source rasters as opaque.
Since the source .jp2 files already have an alpha band, select only the first three bands, and then also pass -addalpha when constructing the VRT:
In some places, e.g. the San Gabriel mountains, there's an ugly green:

It's clear when you look with no background, that these are parts of the imagery that are transparent:

This is because I'm currently doing
This makes all image pixels with 0,0,0[,0?] set as

nodata
, which makes them transparent when rendered. The issue is that there are some places in the original imagery that are so heavily shaded that they actually have pure-black values. For example, this is the original image with correct colors:The text was updated successfully, but these errors were encountered: