10-09-2019 04:54 AM
I have a folder containing all the customer raster files, and the goal is to use a collection of areas (Shapefile) to generate a new folder (one per area) containing the raster touching this area (a same input raster file can appear in different output folders)
I have 2 questions about it :
Solved! Go to Solution.
10-09-2019 05:22 AM
To spatial query on raster, I have tried :
10-09-2019 07:46 AM
Sorry for the spam, but I hoped to find a solution, but I encountered a new problem. The situation is :
The process works fine for the first files, because they are inside the mask, and the .img file is correctly created in my output directory. But an error occured when the first raster file outside the area is processed. The Apply Mask operator raises an exception
I have 2 questions :
For the images with an intersection with the ShapeFile boundary, the result is correct, and can be displayed in GM Desktop without any problem
10-09-2019 08:14 AM
I have been working on the model for the same purpose: to subset rasters by a defined shapefile, while skipping those that do not intersect. Please find the attached model and try if it works for you.
10-09-2019 08:25 AM - edited 10-09-2019 08:27 AM
Forgot to mention that I have defined the directory for output files in Directory Input operator. So you need to define there your own output folder. Or if you want to save output files to the same folder as input, you can use Get Containing Directory operator. Also with the set of Cat operators you can manipulate with the file paths, names, extensions...
10-09-2019 09:28 AM
The model works well, but I got a crash after 10mn. I have re-run it after keeping only few input files, and it works.
I have monitored the ERDAS Spatial Model Editor (32bits) process in the task manager during this second execution, and I noticed that this process grows only. It starts from 1Gb and terminates to more than 2Gb. I'm afraid than during the first execution the process crashes just after this 2Gb limit (as all our 32bits processes...)
I have not btried to change the output raster type, I will test it tomorrow. Do you think that only change the operator where you add '_subset.img' by specifying '_subset.jp2' is the only thing to change to get .jp2 file as output? Or a conversion operator is needed?
10-09-2019 11:29 AM - edited 10-09-2019 11:34 AM
why not try running it 64-bit (via Run in Background)?
Or, if you're running ERDAS IMAGINE 2018 or later, the Spatial Model Editor itself will execute 64-bit.
10-10-2019 01:19 AM
I have use the 'Run in Background' option but it seems to be in 32bits, here is my task manager
After 5mn of execution, I get the same message 'Not enough memory'
When the process crashes, he is at 2,8Gb
I have not Imagine 2018, I just installed GM Desktop 2018 on my machine and when you install it, you have a Spatial Model Editor 2018 installed on your machine
10-10-2019 05:04 AM
Ah - since GeoMedia is a 32-bit application you may only get the 32-bit version of Spatial Modeler with it.