Select to view content in your preferred language

GeoTIFF file background transparency

1089
1
01-14-2019 08:00 PM
User5858
New Contributor

I am using this ArcGIS Runtime SDK for .NET Code Sample code to show a GeoTIFF file on my map. Some parts of my GeoTIFF file does not include any image and should display transparent.

The SDK shows the GeoTIFF file on map fine except the fact that the area that should display transparent are showing black, and users cannot see what is on the underneath map.

Is there any way to tell the SDK to show the GeoTIFF background transparent instead of black?

Tags (2)
0 Kudos
1 Reply
MichaelBranscomb
Esri Frequent Contributor

Hi,

Currently there is no API feature for specifying the transparent pixel value, but you could try applying a mask function via a JSON definition:

{
 "raster_function":{"type":"Mask_function"},
 "raster_function_arguments":
 {
 "nodata_values":{"double_array":[value1, value2, ..., valueN],"type":"Raster_function_variable"},
 "nodata_interpretation":{"nodata_interpretation":"all","type":"Raster_function_variable"},
 "raster":{"name":"raster","is_raster":true,"type":"Raster_function_variable"},
 "type":"Raster_function_arguments"
 },
 "type":"Raster_function_template"
}

Shown in sample: arcgis-runtime-samples-dotnet/RasterLayerRasterFunction.xaml.cs at master · Esri/arcgis-runtime-samp... 

Cheers

Mike

0 Kudos