Gpt WriteImage - where did it go?

I am using SeaDAS as well, and I noticed that the WriteImage gpt operator is gone since SeaDAS 8 and I don’t see it in SNAP 9.0.0 either… Is there now another way to output bands to a png using a specific color scheme and min/max values? Thanks!

I’m not aware of a WriteImage operator.
There is the WriteRGB operator. But it is not exposed publicly and nut very useful.

To generate images, you can use the pconvert tool.


EOMasters_icon_60 Marco from EOMasters - Mastering Earth Observation

Thanks for the reply. I’ll check out pconvert.

FWIW, with the older gpt (2019?) bundled with SeaDAS 7.5.3 it was still there:

/opt/seadas/seadas-7.5.3/bin 1007]$ ./gpt.sh -h WriteImage
Usage:
  gpt WriteImage [options] 

Description:
  Creates a color image from a single source band.


Source Options:
  -Ssource=<file>    Primary source input from which an RGB image is to be generated.
                     This is a mandatory source.

Parameter Options:
  -PcolourScaleMax=<double>                Maximum value of colour scale. Used only if colour palette definition not present.
                                           Default value is '1.0'.
  -PcolourScaleMin=<double>                Minimum value of colour scale. Used only if colour palette definition not present.
                                           Default value is '0.01'.
  -PcontourFilePath=<string>               Source file to generate contour lines. It can be a separate file or the same input source file.
  -PcontourLayer=<boolean>                 Add contour layer to the target image.
                                           Default value is 'false'.
  -PcpdAutoDistribute=<boolean>            Auto distribute points between min/max
                                           Default value is 'true'.
  -PcpdFilePath=<string>                   Color palette definition file
                                           Default value is 'nofile.cpd'.
  -PfilePath=<string>                      The file to which the image is written.
  -PformatName=<string>                    Output image format
                                           Default value is 'png'.
  -PgraticuleLayer=<boolean>               Add graticule layer to the target image.
                                           Default value is 'false'.
  -PgraticuleLayerLabel=<boolean>          Add lat/lon labels on the graticule layer.
                                           Default value is 'true'.
  -PgraticuleLayerTickEnabled=<boolean>    Add tick to the graticule lat/lon labels.
                                           Default value is 'true'.
  -Plevel=<int>                            Output image reduction factor.
                                           Default value is '0'.
  -PmaskFilePath=<string>                  Source file to generate image masks. It can be a separate file or the same input source file.
  -PmaskLayer=<boolean>                    Add mask layer(s) to the target image.
                                           Default value is 'false'.
  -PscaleType=<string>                     The scale type to apply. Can be 'linear' or 'log'.
                                           Default value is 'linear'.
  -PsourceBandName=<string>                Name of band containing data. If not provided, first band in the source product is used.
  -PtextAnnotationLayer=<boolean>          Add text annotation layer to the target image.
                                           Default value is 'false'.

Graph XML Format:
  <graph id="someGraphId">
    <version>1.0</version>
    <node id="someNodeId">
      <operator>WriteImage</operator>
      <sources>
        <source>${source}</source>
      </sources>
      <parameters>
        <maskFilePath>string</maskFilePath>
        <contourFilePath>string</contourFilePath>
        <sourceBandName>string</sourceBandName>
        <imageMasks>
          <imageMask>
            <imageMaskSourceBandName>string</imageMaskSourceBandName>
            <imageMaskName>string</imageMaskName>
            <imageMaskDescription>string</imageMaskDescription>
            <imageMaskExpression>string</imageMaskExpression>
            <imageMaskColor>int,int,int,...</imageMaskColor>
            <imageMaskTransparency>double</imageMaskTransparency>
          </imageMask>
          <.../>
        </imageMasks>
        <contours>
          <contour>
            <contourSourceBandName>string</contourSourceBandName>
            <contourName>string</contourName>
            <contourValue>string</contourValue>
            <applyFilter>boolean</applyFilter>
            <filterName>string</filterName>
            <contourLineColor>int,int,int,...</contourLineColor>
            <contourLineStyle>double,double,double,...</contourLineStyle>
            <contourLineDashLength>double</contourLineDashLength>
            <contourLineSpaceLength>double</contourLineSpaceLength>
          </contour>
          <.../>
        </contours>
        <textAnnotations>
          <textAnnotation>
            <textAnnotationName>string</textAnnotationName>
            <textAnnotationDescription>string</textAnnotationDescription>
            <textAnnotationContent>string</textAnnotationContent>
            <textAnnotationFontName>string</textAnnotationFontName>
            <textAnnotationFontStyle>int</textAnnotationFontStyle>
            <textAnnotationFontSize>int</textAnnotationFontSize>
            <textAnnotationFontColor>int,int,int,...</textAnnotationFontColor>
            <textAnnotationLocation>int,int,int,...</textAnnotationLocation>
            <textAnnotationLatLon>float,float,float,...</textAnnotationLatLon>
          </textAnnotation>
          <.../>
        </textAnnotations>
        <maskLayer>boolean</maskLayer>
        <contourLayer>boolean</contourLayer>
        <textAnnotationLayer>boolean</textAnnotationLayer>
        <graticuleLayer>boolean</graticuleLayer>
        <graticuleLayerLabel>boolean</graticuleLayerLabel>
        <graticuleLayerTickEnabled>boolean</graticuleLayerTickEnabled>
        <filePath>string</filePath>
        <formatName>string</formatName>
        <cpdFilePath>string</cpdFilePath>
        <cpdAutoDistribute>boolean</cpdAutoDistribute>
        <colourScaleMin>double</colourScaleMin>
        <colourScaleMax>double</colourScaleMax>
        <level>int</level>
        <scaleType>string</scaleType>
      </parameters>
    </node>
  </graph>

Thanks, for the info. This was written by the SeaDAS guys.
seadas/seadas-writeimage-operator/src/main/java/gov/nasa/gsfc/seadas/writeimage/WriteImageOp.java at master · seadas/seadas (github.com)

Ah, ok! I will check with them. It is a nice function though, maybe you can include it as well…