What should geometry be when importing vector and using as a mask with gpt?


I created and used a graph in SNAP GUI which imported a shapefile as a vector and then used it as a mask.

I’m trying to use the same graph with gpt to do the task but the Land-Sea-Mask operator geometry field needs a value and I can’t work out what this should be.

As created in the GUI, geometry is given the value of the shapefile filename minus the file extension, but run via gpt this is not recognised.

Here below are the Import-Vector and mask operators from the graph created by the GUI.

  <node id="Import-Vector">
      <sourceProduct refid="Land-Sea-Mask"/>
    <parameters class="com.bc.ceres.binding.dom.XppDomElement">
  <node id="Land-Sea-Mask(2)">
      <sourceProduct refid="Import-Vector"/>
    <parameters class="com.bc.ceres.binding.dom.XppDomElement">


I think you are doing it correct. You can try to write the output of the Import-Vector node to BEAM-DIMAP and have a look how the vector data is named.
You are showing only a part of your graph, I see that you have two Land-Sea-Mask nodes, maybe the root of the problem is located somewhere else.


Your tip about writing the output of the Import-Vector node to BEAM-DIMAP was spot on.

If the imported shapefile is called /somepath/somename.shp then the geometry is called somename_1

I can now use the graph from the command line and pass gpt the correct geometry name.