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
Occasional Contributor
Posts: 16
Registered: ‎10-05-2020
Accepted Solution

Erdas Spatial Model Editor to Python Code Help

Hello, 

 

I'm converting Spatial Modeler tools to Python code and I'm trying to figure out how to seperate the Raster Information output so that the 'Check If MS Unsiged' can get the Data Type and the 'Dynamic Table Series' can get the Band Count. Any suggestions on what the Python code might look like for the Raster Information Output? 

 

Thanks, 

Mason

 

 

Erdas_Spatial_Modeler_Information (1).PNG

Occasional Contributor
Posts: 16
Registered: ‎10-05-2020

Re: Erdas Spatial Model Editor to Python Code Help

I was attempting to convert everything I saw in the NNDiffuse Model Editor but after getting stuck I just tried: 

 

in = m.PanSharpenByNNDiffuse(input1, input2) 
out = m.RasterOutput(in, outputDirectory)

Annnnd it worked hah! I chose the difficult path of trying to recreate everything inside of the tool when there was an easier answer all along.