Skip to content

Instantly share code, notes, and snippets.

@fabricebrito
Created April 1, 2021 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabricebrito/fe7df152e9f0df3a3ff6d3974b87e9e2 to your computer and use it in GitHub Desktop.
Save fabricebrito/fe7df152e9f0df3a3ff6d3974b87e9e2 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<graph>
<version>1.0</version>
<node id="read">
<operator>Read</operator>
<sources/>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<bandNames/>
<copyMetadata>true</copyMetadata>
<file>/home/fbrito/Downloads/temp0.tif</file>
<formatName>GeoTiff</formatName>
<geometryRegion/>
<maskNames/>
<pixelRegion/>
</parameters>
</node>
<node id="dbToLinear">
<operator>BandMaths</operator>
<sources>
<sourceProduct refid="read"/>
</sources>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<targetBands>
<targetBand>
<name>band_1</name>
<expression>pow(10,(band_1/10))</expression>
<type>float32</type>
<description/>
<unit/>
<no_data_value>0.0</no_data_value>
</targetBand>
</targetBands>
<variables/>
</parameters>
</node>
<node id="speckle-filter">
<operator>Speckle-Filter</operator>
<sources>
<sourceProduct refid="dbToLinear"/>
</sources>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<anSize>50</anSize>
<dampingFactor>2</dampingFactor>
<enl>1.0</enl>
<estimateENL>true</estimateENL>
<filter>Lee Sigma</filter>
<filterSizeX>3</filterSizeX>
<filterSizeY>3</filterSizeY>
<numLooksStr>1</numLooksStr>
<sigmaStr>0.9</sigmaStr>
<sourceBandNames/>
<targetWindowSizeStr>3x3</targetWindowSizeStr>
<windowSize>5x5</windowSize>
</parameters>
</node>
<node id="linearTodb">
<operator>BandMaths</operator>
<sources>
<sourceProduct refid="speckle-filter"/>
</sources>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<targetBands>
<targetBand>
<name>band_1</name>
<expression>10*log10(band_1)</expression>
<type>float32</type>
<description/>
<unit/>
<no_data_value>0.0</no_data_value>
</targetBand>
</targetBands>
<variables/>
</parameters>
</node>
<node id="stretching">
<operator>BandMaths</operator>
<sources>
<sourceProduct refid="linearTodb"/>
</sources>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<targetBands>
<targetBand>
<name>band_1</name>
<expression>if fneq(band_1,0.0) then (if band_1 &amp;lt;= -27 then -27 else (if band_1 &amp;gt;= 0 then 0 else band_1)) else NaN</expression>
<type>float32</type>
<description/>
<unit/>
<no_data_value>0.0</no_data_value>
</targetBand>
</targetBands>
<variables/>
</parameters>
</node>
<node id="encoding8bit">
<operator>BandMaths</operator>
<sources>
<sourceProduct refid="stretching"/>
</sources>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<targetBands>
<targetBand>
<name>band_1</name>
<expression>if !nan(band_1) then floor(band_1*9.4+255) else NaN</expression>
<type>float32</type>
<description/>
<unit/>
<no_data_value>0.0</no_data_value>
</targetBand>
</targetBands>
<variables/>
</parameters>
</node>
<node id="write">
<operator>Write</operator>
<sources>
<sourceProduct refid="encoding8bit"/>
</sources>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<clearCacheAfterRowWrite>false</clearCacheAfterRowWrite>
<deleteOutputOnFailure>true</deleteOutputOnFailure>
<file>res1.tif</file>
<formatName>GeoTIFF-BigTIFF</formatName>
<writeEntireTileRows>false</writeEntireTileRows>
</parameters>
</node>
</graph>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment