Hexagon Geospatial
MENU

Spatial Modeler Q&A

Learn more about our products, find answers, get the latest updates, and connect with other Hexagon Geospatial product users, or get support from our professional service team.
Showing results for 
Search instead for 
Do you mean 

Now is the time to go happy-go-lucky with ERDAS IMAGINE

by Technical Evangelist on ‎07-14-2016 04:11 AM - edited on ‎09-01-2016 04:20 AM by sbent (4,333 Views)

Spatial Modeler in ERDAS IMAGINE is evolving with new functionalities covering various aspects of Geospatial Technology. The robust extensible processing architecture of Spatial Modeler enriches the user experience by making use of the same model with different datasets. It is also possible to execute multiple models in the form of daisy-chain such that output of one model can be fed as input to next model. But all these possibilities require manual triggering/monitoring of the executions. Wouldn’t it sound exciting, if there was a mechanism which would automatically trigger and monitor the executions?

ERDAS IMAGINE has been providing powerful tools for automating tasks to maximize productivity. In similar lines, we introduce here one such solution in the form of a tool called WATCH BUCKET. WATCH BUCKET monitors a particular folder 24x7 for any new files added. As soon as new files are detected in the folder WATCH BUCKET triggers Spatial Modeler execution without launching ERDAS IMAGINE and finally output is ready for the analysis. Doesn’t this make someone Happy-Go-Lucky?

Excited to see how the tool works? Here we go.

 

HOW THE TOOL WORKS? 

Watch Bucket tool contains two tabs namely Create Input file and Run.

 

CREATE INPUT FILE

 Create Input file tab is to create an INI file with specified field inputs that are required to monitor a folder and run spatial models.

  • Batch command syntax to run in Watch bucket tool is
  •  smprocess <gmdx file path> ‘<Input Port Name>=%InputFilePath%’  ‘<Output Port Name > = %OutputFilePath%’
  • Clicking on ‘Create ini’ button will create an INI file in the specified path. 

RUN

 ‘Run’ tab is to invoke a python script which takes INI file as an input to monitor a folder and execute spatial models automatically.

  • Click ‘Run’ button in Run tab to invoke the python script. Command prompt will open indicating python script started watching a specific folder.

 Whenever a new file is added to the watch folder, which has an extension specified in the “Input file extension” field (for e.g.:  img), batch command starts running automatically with the newly added file as input.

 

Spatial Model execution through the batch command happens automatically without even launching ERDAS IMAGINE. The output file is generated with the same name as input file. Output file extension will be taken from the ‘Output file extension’ field.

  

EXECUTION MESSAGES

Once the watch bucket executes a batch command, execution messages appear for the following three cases based on the input file added:

  • Success
  • Failure
  • Skipped

Success:

If the spatial model ran successfully then a success message appears in the command prompt.

**** success: Output generated successfully! 

Failure:

An error message appears in the command prompt

*** error: Output is not generated! Please check if the command is correct:

 Skipped:

In case if the newly added file extension doesn’t match with the ‘Input file extension’ specified in the INI file then following message appears

File skipped! :Reason: File extension is not img

 

This tool can be downloaded from here.

 

Conclusion:

To conclude, by using Watch Bucket you can simply add new files directly to a folder. Watch bucket would automatically execute the spatial model and produce output for you without even launching ERDAS IMAGINE!!

 

  

Acknowledgement:

Concept: Frank Obusek (Staff Customer Application Engineer, U.S. Pre-Sales)

Ideation: Vindhya Perepa

Article: FIRE Hawks team

 

Comments
by
on ‎01-12-2017 09:42 AM

Nope, fraid not (had tried that):

2017-01-12 17_41_01-Administrator_ C__Windows_System32_cmd.exe.png

by Technical Evangelist
on ‎01-12-2017 09:55 AM

Would it be possible to send me your model?

 

Thanks,

Pramod

by
on ‎01-12-2017 09:58 AM

 Here you go. I've got no attachment option (again) so code is below. File is watch_ndvi_l8.gmdx

<?xml version="1.0" encoding="UTF-8"?>
<Solution xmlns="http://tempuri.org/XMLSchema.xsd" Version="2016">
	<Operator Namespace="IMAGINE" Name="Process">
		<DisplayName>normalized_difference</DisplayName>
		<Port Name="RasterFilenameIn">
			<DisplayName>RasterFilenameIn</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>false</Hidden>
			<Optional>false</Optional>
			<Attribute Name="AdditionalTypes">
				<Data>
					<JsonValue>{&quot;Items&quot;:[&quot;IMAGINE.File&quot;]}</JsonValue>
					<Type Namespace="IMAGINE" Name="StringList"/>
				</Data>
			</Attribute>
			<Attribute Name="Keywords">
				<Data>
					<JsonValue>&quot;&quot;</JsonValue>
					<Type Namespace="IMAGINE" Name="String"/>
				</Data>
			</Attribute>
			<Attribute Name="PositionX">
				<Data>
					<JsonValue>-95</JsonValue>
					<Type Namespace="IMAGINE" Name="Int"/>
				</Data>
			</Attribute>
			<Attribute Name="PositionY">
				<Data>
					<JsonValue>236</JsonValue>
					<Type Namespace="IMAGINE" Name="Int"/>
				</Data>
			</Attribute>
		</Port>
		<Port Name="RasterFilenameOut">
			<DisplayName>RasterFilenameOut</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>false</Hidden>
			<Optional>false</Optional>
			<Data>
				<JsonValue>&quot;4&quot;</JsonValue>
				<Type Namespace="IMAGINE" Name="File"/>
			</Data>
			<Attribute Name="AdditionalTypes">
				<Data>
					<JsonValue>{&quot;Items&quot;:[&quot;IMAGINE.File&quot;]}</JsonValue>
					<Type Namespace="IMAGINE" Name="StringList"/>
				</Data>
			</Attribute>
			<Attribute Name="Keywords">
				<Data>
					<JsonValue>&quot;&quot;</JsonValue>
					<Type Namespace="IMAGINE" Name="String"/>
				</Data>
			</Attribute>
			<Attribute Name="PositionX">
				<Data>
					<JsonValue>941</JsonValue>
					<Type Namespace="IMAGINE" Name="Int"/>
				</Data>
			</Attribute>
			<Attribute Name="PositionY">
				<Data>
					<JsonValue>361</JsonValue>
					<Type Namespace="IMAGINE" Name="Int"/>
				</Data>
			</Attribute>
		</Port>
		<Connections ParentPort="RasterFilenameIn" ChildDisplayName="Raster Input" ChildPort="Filename" Alias="true"/>
		<Connections ParentPort="RasterFilenameOut" ChildDisplayName="Raster Output" ChildPort="FilenameIn" Alias="true"/>
		<Process>
			<Namespace></Namespace>
			<Name></Name>
			<DisplayName>normalized_difference</DisplayName>
			<DisplayCategory>General</DisplayCategory>
			<Description></Description>
			<Icon>sign_warning_toxic.ico</Icon>
			<ColorCategory>Submodel</ColorCategory>
			<Keywords></Keywords>
			<UIProviderNamespace></UIProviderNamespace>
			<UIProviderName></UIProviderName>
			<IsUsableInExpression>true</IsUsableInExpression>
			<Syntax>Model (  )</Syntax>
			<Operators>Raster Input</Operators>
			<Operators>Band 1</Operators>
			<Operators>Band 2</Operators>
			<Operators>Add</Operators>
			<Operators>Subtract</Operators>
			<Operators>Divide</Operators>
			<Operators>Raster Output</Operators>
			<Tails>Raster Output</Tails>
		</Process>
	</Operator>
	<Operator Namespace="IMAGINE" Name="RasterInput">
		<DisplayName>Raster Input</DisplayName>
		<Port Name="Filename">
			<DisplayName>Filename</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>false</Hidden>
		</Port>
		<Port Name="DataType">
			<DisplayName>DataType</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>false</Hidden>
			<Data>
				<JsonValue>&quot;Float&quot;</JsonValue>
				<Type Namespace="IMAGINE" Name="SimpleDataType"/>
			</Data>
		</Port>
		<Port Name="Interpolation">
			<DisplayName>Interpolation</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>true</Hidden>
			<Data>
				<JsonValue>&quot;&quot;</JsonValue>
				<Type Namespace="IMAGINE" Name="String"/>
			</Data>
		</Port>
		<Port Name="MapBoundary">
			<DisplayName>MapBoundary</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>true</Hidden>
		</Port>
		<Port Name="FileBoundary">
			<DisplayName>FileBoundary</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>true</Hidden>
		</Port>
		<Port Name="AOI">
			<DisplayName>AOI</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>true</Hidden>
		</Port>
		<Port Name="Recode">
			<DisplayName>Recode</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>true</Hidden>
		</Port>
		<Port Name="AttributesOnRasterOut">
			<DisplayName>AttributesOnRasterOut</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>true</Hidden>
		</Port>
		<Port Name="ReadMetadata">
			<DisplayName>ReadMetadata</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>true</Hidden>
		</Port>
		<Port Name="RasterOut">
			<DisplayName>RasterOut</DisplayName>
			<Description></Description>
			<Input>false</Input>
			<Output>true</Output>
			<Hidden>false</Hidden>
		</Port>
		<Port Name="AttributeTable">
			<DisplayName>AttributeTable</DisplayName>
			<Description></Description>
			<Input>false</Input>
			<Output>true</Output>
			<Hidden>false</Hidden>
		</Port>
		<Port Name="Metadata">
			<DisplayName>Metadata</DisplayName>
			<Description></Description>
			<Input>false</Input>
			<Output>true</Output>
			<Hidden>true</Hidden>
		</Port>
		<Port Name="NoData">
			<DisplayName>NoData</DisplayName>
			<Description></Description>
			<Input>false</Input>
			<Output>true</Output>
			<Hidden>true</Hidden>
		</Port>
		<Connections ParentDisplayName="normalized_difference" ParentPort="RasterFilenameIn" ChildPort="Filename"/>
		<Connections ParentPort="RasterOut" ChildDisplayName="Band 1" ChildPort="RasterIn"/>
		<Connections ParentPort="RasterOut" ChildDisplayName="Band 2" ChildPort="RasterIn"/>
		<Attribute Name="FlowControl">
			<Data>
				<JsonValue>false</JsonValue>
				<Type Namespace="IMAGINE" Name="Bool"/>
			</Data>
		</Attribute>
		<Attribute Name="Orientation">
			<Data>
				<JsonValue>0</JsonValue>
				<Type Namespace="IMAGINE" Name="Int"/>
			</Data>
		</Attribute>
		<Attribute Name="PositionX">
			<Data>
				<JsonValue>84</JsonValue>
				<Type Namespace="IMAGINE" Name="Int"/>
			</Data>
		</Attribute>
		<Attribute Name="PositionY">
			<Data>
				<JsonValue>261</JsonValue>
				<Type Namespace="IMAGINE" Name="Int"/>
			</Data>
		</Attribute>
	</Operator>
	<Operator Namespace="IMAGINE" Name="BandSelection">
		<DisplayName>Band 1</DisplayName>
		<Port Name="RasterOut">
			<DisplayName>RasterOut</DisplayName>
			<Description></Description>
			<Input>false</Input>
			<Output>true</Output>
			<Hidden>false</Hidden>
		</Port>
		<Port Name="RasterIn">
			<DisplayName>RasterIn</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>false</Hidden>
		</Port>
		<Port Name="BandRange">
			<DisplayName>BandRange</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>false</Hidden>
			<Data>
				<JsonValue>{&quot;Items&quot;:[{&quot;End&quot;:5.0,&quot;Start&quot;:5.0}]}</JsonValue>
				<Type Namespace="IMAGINE" Name="RangeList"/>
			</Data>
		</Port>
		<Connections ParentDisplayName="Raster Input" ParentPort="RasterOut" ChildPort="RasterIn"/>
		<Connections ParentPort="RasterOut" ChildDisplayName="Subtract" ChildPort="Input1"/>
		<Connections ParentPort="RasterOut" ChildDisplayName="Add" ChildPort="Input1"/>
		<Parents>Raster Input</Parents>
		<Attribute Name="FlowControl">
			<Data>
				<JsonValue>false</JsonValue>
				<Type Namespace="IMAGINE" Name="Bool"/>
			</Data>
		</Attribute>
		<Attribute Name="Orientation">
			<Data>
				<JsonValue>0</JsonValue>
				<Type Namespace="IMAGINE" Name="Int"/>
			</Data>
		</Attribute>
		<Attribute Name="PositionX">
			<Data>
				<JsonValue>280</JsonValue>
				<Type Namespace="IMAGINE" Name="Int"/>
			</Data>
		</Attribute>
		<Attribute Name="PositionY">
			<Data>
				<JsonValue>155</JsonValue>
				<Type Namespace="IMAGINE" Name="Int"/>
			</Data>
		</Attribute>
	</Operator>
	<Operator Namespace="IMAGINE" Name="BandSelection">
		<DisplayName>Band 2</DisplayName>
		<Port Name="RasterOut">
			<DisplayName>RasterOut</DisplayName>
			<Description></Description>
			<Input>false</Input>
			<Output>true</Output>
			<Hidden>false</Hidden>
		</Port>
		<Port Name="RasterIn">
			<DisplayName>RasterIn</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>false</Hidden>
		</Port>
		<Port Name="BandRange">
			<DisplayName>BandRange</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>false</Hidden>
			<Data>
				<JsonValue>{&quot;Items&quot;:[{&quot;End&quot;:4.0,&quot;Start&quot;:4.0}]}</JsonValue>
				<Type Namespace="IMAGINE" Name="RangeList"/>
			</Data>
		</Port>
		<Connections ParentDisplayName="Raster Input" ParentPort="RasterOut" ChildPort="RasterIn"/>
		<Connections ParentPort="RasterOut" ChildDisplayName="Subtract" ChildPort="Input2"/>
		<Connections ParentPort="RasterOut" ChildDisplayName="Add" ChildPort="Input2"/>
		<Parents>Raster Input</Parents>
		<Attribute Name="FlowControl">
			<Data>
				<JsonValue>false</JsonValue>
				<Type Namespace="IMAGINE" Name="Bool"/>
			</Data>
		</Attribute>
		<Attribute Name="Orientation">
			<Data>
				<JsonValue>0</JsonValue>
				<Type Namespace="IMAGINE" Name="Int"/>
			</Data>
		</Attribute>
		<Attribute Name="PositionX">
			<Data>
				<JsonValue>278</JsonValue>
				<Type Namespace="IMAGINE" Name="Int"/>
			</Data>
		</Attribute>
		<Attribute Name="PositionY">
			<Data>
				<JsonValue>384</JsonValue>
				<Type Namespace="IMAGINE" Name="Int"/>
			</Data>
		</Attribute>
	</Operator>
	<Operator Namespace="IMAGINE" Name="Add">
		<DisplayName>Add</DisplayName>
		<Port Name="Input1">
			<DisplayName>Input1</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>false</Hidden>
		</Port>
		<Port Name="Input2">
			<DisplayName>Input2</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>false</Hidden>
		</Port>
		<Port Name="Output">
			<DisplayName>Output</DisplayName>
			<Description></Description>
			<Input>false</Input>
			<Output>true</Output>
			<Hidden>false</Hidden>
		</Port>
		<Connections ParentDisplayName="Band 1" ParentPort="RasterOut" ChildPort="Input1"/>
		<Connections ParentDisplayName="Band 2" ParentPort="RasterOut" ChildPort="Input2"/>
		<Connections ParentPort="Output" ChildDisplayName="Divide" ChildPort="Input2"/>
		<Parents>Band 1</Parents>
		<Parents>Band 2</Parents>
		<Attribute Name="FlowControl">
			<Data>
				<JsonValue>false</JsonValue>
				<Type Namespace="IMAGINE" Name="Bool"/>
			</Data>
		</Attribute>
		<Attribute Name="Orientation">
			<Data>
				<JsonValue>0</JsonValue>
				<Type Namespace="IMAGINE" Name="Int"/>
			</Data>
		</Attribute>
		<Attribute Name="PositionX">
			<Data>
				<JsonValue>495</JsonValue>
				<Type Namespace="IMAGINE" Name="Int"/>
			</Data>
		</Attribute>
		<Attribute Name="PositionY">
			<Data>
				<JsonValue>371</JsonValue>
				<Type Namespace="IMAGINE" Name="Int"/>
			</Data>
		</Attribute>
	</Operator>
	<Operator Namespace="IMAGINE" Name="Subtract">
		<DisplayName>Subtract</DisplayName>
		<Port Name="Input1">
			<DisplayName>Input1</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>false</Hidden>
		</Port>
		<Port Name="Input2">
			<DisplayName>Input2</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>false</Hidden>
		</Port>
		<Port Name="Output">
			<DisplayName>Output</DisplayName>
			<Description></Description>
			<Input>false</Input>
			<Output>true</Output>
			<Hidden>false</Hidden>
		</Port>
		<Connections ParentDisplayName="Band 1" ParentPort="RasterOut" ChildPort="Input1"/>
		<Connections ParentDisplayName="Band 2" ParentPort="RasterOut" ChildPort="Input2"/>
		<Connections ParentPort="Output" ChildDisplayName="Divide" ChildPort="Input1"/>
		<Parents>Band 1</Parents>
		<Parents>Band 2</Parents>
		<Attribute Name="FlowControl">
			<Data>
				<JsonValue>false</JsonValue>
				<Type Namespace="IMAGINE" Name="Bool"/>
			</Data>
		</Attribute>
		<Attribute Name="Orientation">
			<Data>
				<JsonValue>0</JsonValue>
				<Type Namespace="IMAGINE" Name="Int"/>
			</Data>
		</Attribute>
		<Attribute Name="PositionX">
			<Data>
				<JsonValue>490</JsonValue>
				<Type Namespace="IMAGINE" Name="Int"/>
			</Data>
		</Attribute>
		<Attribute Name="PositionY">
			<Data>
				<JsonValue>167</JsonValue>
				<Type Namespace="IMAGINE" Name="Int"/>
			</Data>
		</Attribute>
	</Operator>
	<Operator Namespace="IMAGINE" Name="Divide">
		<DisplayName>Divide</DisplayName>
		<Port Name="Input1">
			<DisplayName>Input1</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>false</Hidden>
		</Port>
		<Port Name="Input2">
			<DisplayName>Input2</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>false</Hidden>
		</Port>
		<Port Name="Output">
			<DisplayName>Output</DisplayName>
			<Description></Description>
			<Input>false</Input>
			<Output>true</Output>
			<Hidden>false</Hidden>
		</Port>
		<Connections ParentDisplayName="Add" ParentPort="Output" ChildPort="Input2"/>
		<Connections ParentDisplayName="Subtract" ParentPort="Output" ChildPort="Input1"/>
		<Connections ParentPort="Output" ChildDisplayName="Raster Output" ChildPort="RasterIn"/>
		<Parents>Subtract</Parents>
		<Parents>Add</Parents>
		<Attribute Name="FlowControl">
			<Data>
				<JsonValue>false</JsonValue>
				<Type Namespace="IMAGINE" Name="Bool"/>
			</Data>
		</Attribute>
		<Attribute Name="Orientation">
			<Data>
				<JsonValue>0</JsonValue>
				<Type Namespace="IMAGINE" Name="Int"/>
			</Data>
		</Attribute>
		<Attribute Name="PositionX">
			<Data>
				<JsonValue>644</JsonValue>
				<Type Namespace="IMAGINE" Name="Int"/>
			</Data>
		</Attribute>
		<Attribute Name="PositionY">
			<Data>
				<JsonValue>270</JsonValue>
				<Type Namespace="IMAGINE" Name="Int"/>
			</Data>
		</Attribute>
	</Operator>
	<Operator Namespace="IMAGINE" Name="RasterOutput">
		<DisplayName>Raster Output</DisplayName>
		<Port Name="RasterIn">
			<DisplayName>RasterIn</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>false</Hidden>
		</Port>
		<Port Name="FilenameIn">
			<DisplayName>FilenameIn</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>false</Hidden>
			<Data>
				<JsonValue>&quot;4&quot;</JsonValue>
				<Type Namespace="IMAGINE" Name="File"/>
			</Data>
		</Port>
		<Port Name="PixelType">
			<DisplayName>PixelType</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>false</Hidden>
			<Data>
				<JsonValue>&quot;f32&quot;</JsonValue>
				<Type Namespace="IMAGINE" Name="PixelType"/>
			</Data>
		</Port>
		<Port Name="BlockWidth">
			<DisplayName>BlockWidth</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>true</Hidden>
			<Data>
				<JsonValue>512</JsonValue>
				<Type Namespace="IMAGINE" Name="Unsigned"/>
			</Data>
			<Attribute Name="Max">
				<Data>
					<JsonValue>2048.0</JsonValue>
					<Type Namespace="IMAGINE" Name="Double"/>
				</Data>
			</Attribute>
		</Port>
		<Port Name="BlockHeight">
			<DisplayName>BlockHeight</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>true</Hidden>
			<Data>
				<JsonValue>512</JsonValue>
				<Type Namespace="IMAGINE" Name="Unsigned"/>
			</Data>
			<Attribute Name="Max">
				<Data>
					<JsonValue>2048.0</JsonValue>
					<Type Namespace="IMAGINE" Name="Double"/>
				</Data>
			</Attribute>
		</Port>
		<Port Name="Thematicity">
			<DisplayName>Thematicity</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>true</Hidden>
		</Port>
		<Port Name="ComputePyramids">
			<DisplayName>ComputePyramids</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>true</Hidden>
		</Port>
		<Port Name="NoDataValue">
			<DisplayName>NoDataValue</DisplayName>
			<Description></Description>
			<Input>true</Input>
			<Output>false</Output>
			<Hidden>true</Hidden>
		</Port>
		<Port Name="RasterOut">
			<DisplayName>RasterOut</DisplayName>
			<Description></Description>
			<Input>false</Input>
			<Output>true</Output>
			<Hidden>true</Hidden>
		</Port>
		<Port Name="FilenameOut">
			<DisplayName>FilenameOut</DisplayName>
			<Description></Description>
			<Input>false</Input>
			<Output>true</Output>
			<Hidden>true</Hidden>
		</Port>
		<Connections ParentDisplayName="normalized_difference" ParentPort="RasterFilenameOut" ChildPort="FilenameIn"/>
		<Connections ParentDisplayName="Divide" ParentPort="Output" ChildPort="RasterIn"/>
		<Parents>Divide</Parents>
		<Attribute Name="FlowControl">
			<Data>
				<JsonValue>false</JsonValue>
				<Type Namespace="IMAGINE" Name="Bool"/>
			</Data>
		</Attribute>
		<Attribute Name="Orientation">
			<Data>
				<JsonValue>0</JsonValue>
				<Type Namespace="IMAGINE" Name="Int"/>
			</Data>
		</Attribute>
		<Attribute Name="PositionX">
			<Data>
				<JsonValue>1130</JsonValue>
				<Type Namespace="IMAGINE" Name="Int"/>
			</Data>
		</Attribute>
		<Attribute Name="PositionY">
			<Data>
				<JsonValue>317</JsonValue>
				<Type Namespace="IMAGINE" Name="Int"/>
			</Data>
		</Attribute>
	</Operator>
</Solution>
by Technical Evangelist
on ‎01-12-2017 11:01 AM

It turned out to be the extra spaces within the command that is causing this problem. Please replace the code within your ini file with the following one and everything should work as expected.

 

ImagineHome=C:\Program Files\Hexagon\ERDAS IMAGINE 2016
WatchFolder=C:\Support\watch_ndvi
InputFileExtension=img
OutputFolder=C:\Support\watch_ndvi\output_watch_ndvi
OutputFileExtension=img
batchcommand=smprocess C:\Support\watch_ndvi\watch_ndvi_l8.gmdx 'RasterFilenameIn=%InputFilePath%' 'RasterFilenameOut=%OutputFilePath%'
by
on ‎01-12-2017 01:30 PM

Fab! After a couple of hicupps, that all seems to be going swimmingly - thanks ever so much. A couple of things; any idea why sometimes the process doesn't start after trying to run more than one ini file - the cmd window appears and then goes with this error:

 

2017-01-12 21_26_47-Watch Bucket.png

 

Also, is there any way to process nested files? I'd like to run a model on Sentinel-1 SLC data, but the xml file is nested in a directory structure with related necessary files. Is there any way of doing this?

 

Thanks again,

 

Johnnie

Contributors