Hexagon Geospatial
MENU

Spatial Modeler

Discuss topics with other Hexagon Geospatial Product pioneers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Occasional Contributor
Posts: 8
Registered: ‎05-01-2018
Accepted Solution

prompt for output file name in Spatial Modeler

Hi. I'm very new to IMAGINE, and trying to teach myself how to use Spatial Modeler (with some experience with ArcGIS Model Builder).  I'm trying to create a model which will prompt me for both input files (Landsat Bands) to build a Layer stack, and then subset it, AND an output location/filenamefor the subset raster.

 

I've got the input Port prompts working, and have tried both Port Output and Raster Output operators, but still can't get it to prompt me for a filename. My model runs successfully, up to a Preview, but not the output file name prompt.  I have looked at numerous Spatial Modeler tutorials and helpf files for every operator, but can't find the solution.

 

I will appreciate any advice or pointers to the answer elsewhere.

THanks in advance,

Phil C

Technical Evangelist
Posts: 614
Registered: ‎10-01-2015

Re: prompt for output file name in Spatial Modeler

Hi Phil,

 

What does your Model look like? Does it look like this?

 

stuff.PNG

 

Remember - this is NOT a task for the Port Output operator. You are wanting to input the name of the output file. So you use a Port Input connected to the FilenameIn port of the Raster Output operator.

 

About the only time I ever use a Port Output operator is inside Iterators (and other sub-models) to pass information out of the Iterator.

 

If you're still having problems please post a screenshot of what you have.

 

BTW - did you review this eTraining video? It does go through the process of setting up prompts for both inputs and outputs:

 

http://community.hexagongeospatial.com/t5/IMAGINE-Spatial-Modeler/Create-Automatically-Generating-In...

 

Cheers

 

 

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Technical Evangelist
Posts: 614
Registered: ‎10-01-2015

Re: prompt for output file name in Spatial Modeler

There's also various examples of Layer Stacking Landsat scenes in the Spatial Recipes section of the Community. Here's one example:

 

http://community.hexagongeospatial.com/t5/Spatial-Recipes/Stack-Landsat8-MSI/ta-p/14821

 

That one automatically names the output (rather than prompting). But most of the examples in Spatial Recipes have prompts for output filenames.

 

Cheers

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Occasional Contributor
Posts: 8
Registered: ‎05-01-2018

Re: prompt for output file name in Spatial Modeler

Thanks!  exactly the error I had made, and the solution I needed.  Thanks also for the other links and the example that uses the string to select the other bands needed for my stack which will greatly simplify/make more elegant! my model!

I appreciate the help!

Phil

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.