I have a few imagery tile caches created based on imagery in either MrSid or Grid format in ArcGIS Server. I'm trying to clear out some hd space and wanted to remove the copy of the imagery that is on that server, or at least move it. However, despite the cache being created, and I assume being all that is used to display the imagery, Server will not allow me to remove the imagery files that were used to create the cache. If I stop the server service and remove the files, no imagery appears anymore in my applications.
1. Why would a cache need the original imagery data when working with a cache? Is there some way to change this?
2. Where is the reference to the original imagery located so I can change it? I would like to move the data to another drive but not have to recreate the caches since it cripples the server during that process.
Solved! Go to Solution.
By looking at your config.xml you are not using any layer types but dynamic so your cached layers are not actually being used at all. You are bypassing the caching because you have them as type="dynamic".
Just in case this helps others.... The reason the source data was still being used was the cache was set for "update automatically" instead of manually in the settings. Since it is imagery and won't change, I simply changed to manually and I was then able to move the imagery.
That's a good tip to remember.
just as a side, I tend to always check "manual" since it's much cleaner, in my opinion, if you can control when and where (extent) the cache is being created. In pre-10.2.x I thought this was even more of a necessary need, especially since we have a large (ocean) waterbody within our full extent that never really needed to be cached at detail (data sources weren't of the quality to make a difference). That's just another reason that having "manual" checked might help for others.
..and one more note...in previous versions (can't remember which one), if you created a new service and set up the cache on creating, even if you select "manual", it would switch/default back to automatic. So what I did was create the service as dynamic...then immediately went back in and set up the cache and "manually" created the cache. You didn't mention what version you were using, so I wanted to mention this in case you are running into that issue.
By the way, since you problem is solved, remember to mark you question as answered.
Oh and I did see something along the lines of what you said where I set it to manual then it goes right back to automatic. It just seems to be a visual bug though since if you republish the service it shows as manual there as expected.
But if you believe that is what the issue is here then I'm not sure what you are suggesting the solution is.
Eric, when you say you are removing the original images, you aren't messing with the cache folders under arcgisserver directory, are you? Also, I don't see anyplace that you've mention the version you are using. my suggestions might vary depending on the version.
Have you already checked to make sure that the cache is completely built? If not, and you go to a location/scale there is no cache, and you have crate cache in demand, it will try to go back to the original imagery.
Also, depending on where/how you are using the service and cache will make a difference, for example, ArcMap will interpolate at scales in between the cache scales, but if you specify scales in a web app that are different then the cache scale, it may not interpolate and may not show any image if it cant find the original source.
So, a few more details on how you are using the cache, and exactly the situation when you do not have imagery....if/when you move the source files...would be helpful.
No I'm not touching the cache. I mean the files that were used to create the cache.
I'm on 10.3.1
The caches are 100% and have been in place for months.
I'm using the service in a flex application. I assume that between scales you are just seeing the imagery at a lesser resolution otherwise what's the point of the cache? Are you saying that between scales there is some further action being taken? I hadn't looked for the imagery at any scale other than the default map extent but that may not equal the highest cache level.
Meaning, I shut down the services (there was a lock), moved the source imagery, refreshed my app after restarting services, and the imagery was gone. So the simpler question is, why is there a lock?
To answer "why is there a lock"....sometimes these are remnants of when a cache built crashed, or if the service went down what something/someone was attached to the service. If the service is down, I think it is safe to delete them. (but I would move them first, as a test).
Since Robert Scheitlin, GISP was/still-is the flex app expert, I tagged him in case he can chime in on how flex handles caches. I have a couple flex apps still, but it's been a while since I messed with them.
Flex will force the map to display at the Levels of Display (LODs) that the map service was cached at, and will not allow for displaying at scales in between LODs. JS and Flex are similar in this manner where SilverLight allowed you to set the map scale to any desired scale and would just zoom the cache tile to fit the desired scale.
I did some further testing, at least with 1 of my imagery caches. I removed the source imagery and restarted the service and it works fine in ArcMap but not in my flex app. There is no imagery shown at all in the latter but I get no error either. ( I can't zoom to a particular scale)