Whenever I try adding a spatial index to a feature layer stored in the memory workspace, I get an error stating that such a feature type/workspace is not supported.
Is there a way around this, as my model uses iteration and select by location along with other calculations on a heavy feature layer, and using memory really speeds the process up, but its still not fast enough for prototyping. I've also read that spatial indexes speed the process up for such situations, so implementing both would be very useful.
Edit: It was pointed out the spatial indexes cannot be assigned to fcs in memory. If there are any suggestions for speeding up the model please let me know, as it seems to have become slower than before. The sub-model for any newcomers 🙂
Thanks,
Taha
Not according to the documentation
Write geoprocessing output to memory—ArcGIS Pro | Documentation
Memory-based workspaces do not support geodatabase elements such as feature datasets, relationship classes, attribute rules, contingent values, field groups, spatial or attribute indexes, representations, topologies, geometric networks, or network datasets.
More memory or freeing up memory by doing your processing in a trimmed down project with minimal other applications open and running
Thank you for pointing this out. I had seen this before but wanted to double check. When I tried searching for this documentation I couldn't find it.
thx
Memory workspaces have an intrinsic spatial index. You can't change how they operate. That's what that error indicates.
Optimization by spatial index is not an infinite trick. There's always a diminishing returns inflection point, after which performance is harmed by a spatial index. There are lots of other optimization techniques available, but you'd need to provide more details about your task before any could be suggested.
- V
This is the sub model that is causing the slowness. I tried adding a spatial index to it's input before feeding it in hopes of speeding things up, but as you pointed out, that functionality is not supported:
For context the model goes through a data set of lines, sees if lines from another data set intersect it, and if they do, it inherits the name of the first one. If there are any other ways to speed the process up please let me know. I'm currently working on making a script that splits the data set into smaller chunks and runs this tool in parallel to hopefully speed things up, but it is complicated so any help would be appreciated.
It was tried and tested and it used to run really fast before. I added some operations to it, which turned out to be unnecessary, so I ended up removing them, resulting in the original model. For some reason in the past few days, it seems to run very slowly, with functions like calculate field and select by location taking much longer than before. Even something as simple as get field value started taking multiple seconds in a different variation of this model (same data set type input, simply blank names in records.)
Thank you very much
I would try converting your model to a script, it may speed some things up, but the biggest factor would be running your model in a trimmed down project. New project... just the needed data... run it and compare to your existing scenario.
Tried doing that. Unfortunately it didn't work. I think it might be caused by an internal issue within the model/ its variations and the way they interact with each other. Going through each of them yesterday I found some mistakes that had been correct but I don't think the edits went through. Might be because of how frequently I would have to force stop ArcGIS from the task manager when I lost the progress log tab. I'm pretty sure that I need to thoroughly review the models at this point to find any discrepancies. I'll post again if I find a solution and remember 🙂 Thank you for your help.
One thing I did find is that Get Field Value and the other tools seem to take more time with each iteration. If you know of a way around this I would really appreciate it.