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: 6
Registered: ‎08-06-2020
Accepted Solution

Error deleting temp file

Hello everybody,

 

I've created a spatial model for data preparation. One step is to degrade a JPEG2000 with the command-line operator and save it as a temporary file.

After finishing the model I get the following error message:

Failed to delete
c:\...\SM-d249-7c18-5181-fd17-011480\d09a45fb-7f40-4e5a-a752-bdb97554a5f5.jp2!
Error = 32

 

I'm running ERDAS IMAGINE 2020 (Version 16.6.0 Build 1347) as administrator and I've attached a photo of my model to this post.

I can upload the model if necessary.

 

What did I do wrong?

 

Kind regards,

Lennart

 

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

Re: Error deleting temp file

Hi @Lennart_I. 

 

Looks like, as part of the Spatial Model, you're running an external command (in the Command Line operator). It's possible that that program is keeping the resulting file open after completing so that Spatial Modeler can not delete what it considers a temp file when the model is destroyed. You might want to work with Support on that.

 

If you want to perform a degrade function using Spatial Modeler native operators you could have a look at this example:

 

https://community.hexagongeospatial.com/t5/Spatial-Modeler-Tutorials/Raster-Generalization-Degrade-D...

 

Hope that helps.

 

Cheers

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Highlighted
Occasional Contributor
Posts: 6
Registered: ‎08-06-2020

Re: Error deleting temp file

Hi @ian.anderson,

 

I've integrated your model as a submodel and its working perfectly!

I was using the command-line degrade, because i couldn't find a "native solution".

 

Thank you!

 

Regards,

Lennart

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

Re: Error deleting temp file

Glad it worked!

 

Cheers

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial