Spatial Modeler Discussions

Gain, exchange, and share knowledge, or discuss topics with other Hexagon Geospatial Product pioneers and experts to get the most out of Hexagon Geospatial products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Staff
Posts: 117
Registered: ‎07-07-2016
Accepted Solution

Use of iteration operator for vectorial processing

Hi all,

 

I've seen several example using iteration and workflows with image processing, In our case we need to process 480 datasets in shapefile with same structure and workflows (just to a field of shapefile data and hour that comes from the name of dataset) , so I would aprciate to have some example doing this iterating with shape file folders. The end of processing should be one unique table (which I don't see posible union of tables on SP, but will do on database instead) , and initially we may have 480 output tables as a result of the iyeration to aismpel spatial modeler workflow.

 

Highlighted
Technical Evangelist
Posts: 1,028
Registered: ‎10-01-2015

Re: Use of iteration operator for vectorial processing

Hi @jfornons ,

 

Here's a very simple example of iterating with Features and outputting a consolidated Table:

 

features_table.PNG

 

Hope that heps.

 

Cheers

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Highlighted
Staff
Posts: 117
Registered: ‎07-07-2016

Re: Use of iteration operator for vectorial processing

With this example I get a table with names of all shapes files in a folder. Just I need to add them to a Spatial Model where it calculates a functionalatributes and output the shapes to anohter folder. I attach this simple test working with a unique shape file input, and may do the same fro the list got from iterator. How is posible that the saptial model run as much time as number of input files and each time generate an output shape which name may be a string composition of input name and something else.

 

 

 

Highlighted
Technical Evangelist
Posts: 1,028
Registered: ‎10-01-2015

Re: Use of iteration operator for vectorial processing

You'd do it in the same manner as you would for multiple rasters. Build the desired output fle name using the Cat operator and some aspect of the input table that is controlling the Iterator and embed the Features Output within the Iterator. That way each run of the iterator produces a uniquely named output file. The Iterator could still then be set up to output a List of those filenames. 

 

If I have time today I'll try to put an example together.

 

Cheers

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

Re: Use of iteration operator for vectorial processing

Here you go - attached is a model which outputs n shapefiles called <inputname>_copy.shp

 

Main model:

 

features_table1.PNG

 

Content of the Iterator sub-model:

 

features_table2.PNG

 

It still also spits out a list of the filenames it has created for reference.

 

Hope that helps.

 

Cheers

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Highlighted
Staff
Posts: 117
Registered: ‎07-07-2016

Re: Use of iteration operator for vectorial processing

It works perfectly. Thanks