IdePix with Landsat8: s3tbx.landsat.readAs=reflectance ignored

Hi,

I’m trying to perform a classification with IdePix on Landsat 8 OLI L1C data. Using the knowledge from this forum, I adapted the s3tbx.properties file, to include the line s3tbx.landsat.readAs=reflectance. Furthermore, in my GPT call, I added the parameter -Ds3tbx.landsat.readAs=reflectance.

Unfortunately, after resetting and rebooting several times, I still get the following error message:

Error: [NodeId: IdePix] The landsat source product must provide reflectances. For configuration instructions see Idepix help documentation, Processor description for Landsat-8.

So, for completeness, this is what my s3tbx.properties file looks like, stored in $USER\.snap\etc$:

#SNAP configuration 's3tbx'
#Wed Mar 28 11:14:10 CEST 2018
s3tbx.landsat.readAs=reflectance
s3tbx.reader.olci.pixelGeoCoding=true
s3tbx.reader.slstrl1b.loadOrphanPixels=false
s3tbx.reader.meris.pixelGeoCoding=true
s3tbx.reader.slstrl2sst.pixelGeoCodings=false
s3tbx.reader.slstrl1b.pixelGeoCodings=true

And this is the GPT graph I use:

<graph id="2018-03-28 11:23:24">
  <version>1.0</version>
  <node id="Reader">
<operator>Read</operator>
<sources/>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
  <file>Landsat8\preprocessed\LC08_L1TP_198024_20150702_20170407_01_T1.tar.dim</file>
</parameters>
  </node>
  <node id="IdePix">
<sources>
  <sourceProduct refid="Reader"/>
</sources>
<operator>Idepix.Landsat8.OLI</operator>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
  <cloudBufferWidth>2</cloudBufferWidth>
  <refineClassificationNearCoastlines>false</refineClassificationNearCoastlines>
  <nnSelector>ALL</nnSelector>
  <nnCloudAmbiguousLowerBoundaryValue>1.95</nnCloudAmbiguousLowerBoundaryValue>
  <nnCloudAmbiguousSureSeparationValue>3.45</nnCloudAmbiguousSureSeparationValue>
  <nnCloudSureSnowSeparationValue>4.3</nnCloudSureSnowSeparationValue>
  <applyShimezCloudTest>true</applyShimezCloudTest>
  <shimezDiffThresh>0.1</shimezDiffThresh>
  <shimezMeanThresh>0.25</shimezMeanThresh>
  <applyHotCloudTest>false</applyHotCloudTest>
  <hotThresh>0.1</hotThresh>
  <applyClostCloudTest>false</applyClostCloudTest>
  <clostThresh>0.001</clostThresh>
  <applyOtsuCloudTest>false</applyOtsuCloudTest>
  <outputSourceBands>true</outputSourceBands>
  <outputNNValue>false</outputNNValue>
</parameters>
  </node>
  <node id="Writer">
<operator>Write</operator>
<sources>
  <sourceProduct refid="IdePix"/>
</sources>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
  <file>Landsat8\preprocessed\classified/LC08_L1TP_198024_20150702_20170407_01_T1.tar.dim</file>
  <formatName>BEAM-DIMAP</formatName>
</parameters>
  </node>
</graph>

Does anyone have the same experience? Thank you in advance.

The problem is that you use a Landsat product which is already converted to BEAM-DIMAP. The property has only an effect if you use original L8 products.
But you can do the conversion with e.g. the Radiance-to-Reflectance operator. Then it is not exactly what is provided in the original L8 or you need to create the pre-processed product again with this property set.

Thank you for your quick answer. This is clear.
About the Radiance-to-Reflectance operator: I see it only supports OLCI, MERIS and SLSTR, not OLI (Landsat 8), or am I interpreting your suggestion wrong? :slight_smile:

I think my solution will be to perform the IdePix classification first, and then perform the preprocessing chain (which I now performed beforehand, the reason the product was already in BEAM-DIMAP.

Oh, sorry. I forgot that it is not supporting L8.
Your solution overcomes this shortcoming anyway.

Hi,
I have the same problem using oryginal USGS L1T data. I used MTL file to open product and Idepix give an error message: “The landsat source product must provide reflectances …”
Thank you for any suggestion how to perform IdePix for Landsat8.

Have you configured the s3tbx.landsat.readAs property in the s3tbx.properties file or set the parameter -Ds3tbx.landsat.readAs=reflectance on the command line?

For me Landsat is shown correctly as reflectance when I have set this property.

That’s the data I have downloaded:

I hadn’t noticed this configuration note before. Now it is working. Thank you very much for your help.