span8
span4
span8
span4
Hi,
I have an FME2017 desktop workbench where I am writing out to rasters.I don't mind which raster format I write out to (eg.GeoTiff,Esri Ascii Grid,) as long as the raster is readable in ESRI ArcGIS software.I am currently writing out to GeoTiff successfully and the three bands (R,G,B) are displaying correctly in ArcGIS.
The raster only has 10 distinct combination of bands and I would like to create a new band that is based on the combination of the RGB bands and give each cell in the raster a value for this new band.
I would then like to output this new band with the Raster and make the raster displayable by this band in ArcGIS.
Does anyone know how to do this?
Thank you in advance
In that case you want to use a RasterPaletteGenerator which will convert selected bands to a new band with a palette.
Hi@aquamarine,as@jdhsuggested,you can use the RasterPaletteGenerator to transform an RGB24 or RGBA32 raster into a UInt8,UInt16,or UInt32 single band raster with a palette.However,you cannot specify which destination cell value should be mapped to a specific (R,G,B) or (R,G,B,A) combination.In other words,the order of the palette entries cannot be controlled.
If you need to specify the destination single cell value corresponding to a specific (R,G,B) or (R,G,B,A) combination,the RasterExpressionEvaluator would still be a solution.For example,assuming the mapping rule between each destination cell value and original (R,G,B) combination has been given as:
0 0,0,01 0,0,2542 50,101,2543 127,127,04 254,203,05 254,152,06 254,0,07 254,0,2548 229,254,254
Hi,@aquamarine.Have you tried using the RasterInterpretationCoercer before your RasterPaletteAdder?You can force the interpretation to UINT8.
Thank you for your response@jdh.But I don't I think I explained myself properly.
The 10 distinct combinations of the 4 RGBA bands are colours and the new band that I want is just a number that represents each of these colours.Therefore I don't think I can use theRasterExpressionEvaluatorfor this,as far as I am aware.I thought perhaps the answer lies in palettes.所以我试图定义一个调色板使用AttributeCreatorby adding the following text into the text editor:
RGBA32 0 0,0,0,0 1 0,0,254,255 2 50,101,254,255 3 127,127,0,255 4 254,203,0,255 5 254,152,0,255 6 254,0,0,255 7 254,0,254,255 8 229,254,254,255
I followed this with theRasterPaletteAdder:
However I keep getting this error:
@RasterPaletteAttributes: A selected band has intepretation 'RED8',which is not a valid interpretation for a band with palettes.Please ensure that only bands with an interpretation of UINT8,UINT16,or UINT32 are selected.@SelectRaster may be used to modify selection
I feel like I'm on the right track but am missing something...
You can use a RasterExpressionEvaluator to create additional band(s) based on the values of other bands.
Additional bands can be displayed in arcmap by changing the setting of the layer symbology to stretched and selecting the appropriate band.
My personal preference is for GeoTiffs when working with ArcMap,though be advise that there is a 2GB limit.
© 2019 亚搏在线Safe Software Inc |Legal