I am trying to automate the process of object detection using S-1 SAR data. I have created a graph in which I am importing vector dataset (shapefile) and using it for Land sea masking. The graph workflow works well when the vector data is located within the boundaries of the scene (SAR dataset i.e. S-1 GRD).But when the vector data is not overlapping with the scene boundaries(in this case I get the shape file as invalid and process stops). I have to run it over multiple SAR datasets so if any dataset is such that does not overlap with the vector boundaries it gives errros and stops.Can anyone please advise how to deal with such a case and in this case what changes I require to change in my graph ? (The shapefile name is shapefile.shp)
I am using command as :
gpt -Ps1_input=“Input” -Pport_shapefile=“shapefile.shp” -Poutput=“output”
I know I can change the landmask and useSRTM flags but I want to make it conditional i.e. only when there is no overlap…then I have to change the flags. Kindly advise.I am attaching the GPT graph.
<graph id="Graph">
<version>1.0</version>
<node id="Land-Sea-Mask">
<operator>Land-Sea-Mask</operator>
<sources>
<sourceProduct refid="Import-Vector" />
</sources>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<sourceBands />
<landMask>false</landMask>
<useSRTM>false</useSRTM>
<geometry>shape</geometry>
<invertGeometry>false</invertGeometry>
<shorelineExtension>0</shorelineExtension>
</parameters>
</node>
<node id="Calibration">
<operator>Calibration</operator>
<sources>
<sourceProduct refid="Land-Sea-Mask" />
</sources>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<sourceBands />
<auxFile>Product Auxiliary File</auxFile>
<externalAuxFile />
<outputImageInComplex>false</outputImageInComplex>
<outputImageScaleInDb>false</outputImageScaleInDb>
<createGammaBand>false</createGammaBand>
<createBetaBand>false</createBetaBand>
<selectedPolarisations>VH,VV</selectedPolarisations>
<outputSigmaBand>true</outputSigmaBand>
<outputGammaBand>false</outputGammaBand>
<outputBetaBand>false</outputBetaBand>
</parameters>
</node>
<node id="AdaptiveThresholding">
<operator>AdaptiveThresholding</operator>
<sources>
<sourceProduct refid="Calibration" />
</sources>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<targetWindowSizeInMeter>50</targetWindowSizeInMeter>
<guardWindowSizeInMeter>500.0</guardWindowSizeInMeter>
<backgroundWindowSizeInMeter>800.0</backgroundWindowSizeInMeter>
<pfa>12.5</pfa>
<estimateBackground>false</estimateBackground>
</parameters>
</node>
<node id="Object-Discrimination">
<operator>Object-Discrimination</operator>
<sources>
<sourceProduct refid="AdaptiveThresholding" />
</sources>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<minTargetSizeInMeter>30.0</minTargetSizeInMeter>
<maxTargetSizeInMeter>600.0</maxTargetSizeInMeter>
</parameters>
</node>
<node id="Read">
<operator>Read</operator>
<sources />
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<file>$s1_input</file>
</parameters>
</node>
<node id="Import-Vector">
<operator>Import-Vector</operator>
<sources>
<sourceProduct refid="Apply-Orbit-File" />
</sources>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<vectorFile>$port_shapefile</vectorFile>
<separateShapes>false</separateShapes>
</parameters>
</node>
<node id="Apply-Orbit-File">
<operator>Apply-Orbit-File</operator>
<sources>
<sourceProduct refid="Read" />
</sources>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<orbitType>Sentinel Precise (Auto Download)</orbitType>
<polyDegree>3</polyDegree>
<continueOnFail>true</continueOnFail>
</parameters>
</node>
<node id="Write">
<operator>Write</operator>
<sources>
<sourceProduct refid="Object-Discrimination" />
</sources>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<file>$output</file>
<formatName>BEAM-DIMAP</formatName>
</parameters>
</node>
<applicationData id="Presentation">
<Description />
<node id="Land-Sea-Mask">
<displayPosition x="102.0" y="182.0" />
</node>
<node id="Calibration">
<displayPosition x="183.0" y="240.0" />
</node>
<node id="AdaptiveThresholding">
<displayPosition x="281.0" y="241.0" />
</node>
<node id="Object-Discrimination">
<displayPosition x="434.0" y="176.0" />
</node>
<node id="Read">
<displayPosition x="31.0" y="44.0" />
</node>
<node id="Import-Vector">
<displayPosition x="22.0" y="137.0" />
</node>
<node id="Apply-Orbit-File">
<displayPosition x="19.0" y="88.0" />
</node>
<node id="Write">
<displayPosition x="525.0" y="106.0" />
</node>
</applicationData>
</graph>