Can anyone tell me how to generate server tile cache remotly?

1221
5
Jump to solution
01-18-2017 01:19 AM
YOUNG_GONBAEK
New Contributor

I have been generating server tile cache manually every time my customer ask.

I knew about ImportTileCache_management function, So here is my question

Can I make server tile cache remotely using ImportTileCache_management function in arcpy?

I am wondering no sample code found in the site how to make it with arcpy.

In the sample code, for example

arcpy.ImportTileCache_management(

"C:/Data/CacheDatasets/Target",

"C:/Data/CacheDatasets/Source",

"4000;2000;1000", "#","MERGE")

Can i use some specific URL or URI for the first parameter? like,

arcpy.ImportTileCache_management(

"remote_machine/Datasets/Target",

"remote_machine/Datasets/Source",

"4000;2000;1000", "#","MERGE")

I deeply thank you in advance

0 Kudos
1 Solution

Accepted Solutions
RebeccaStrauch__GISP
MVP Esteemed Contributor

I have not used the ImportTileCache tool, but do create all our caches on a development server, then I just copy the updated tiles over to the production machine and refresh the services.  

Our services are set up using the same data source structure (that is, the local d:\data\<data>) and registered the same, so the mxd can be identical too.  Our area or interest is large, but probably not as varied as yours, so I can typically just copy/replace the cache as needed.  Our servers are within the same network/firewall, so copying is not an issue.

We have a similar workflow for replacing datasets that are used by services.  Because locks can occur that can prevent replacing data sources and refreshing, I have a tool the queries each data source to see if it is being accessed by the service, creates a list and stops these services so the data source can be replaced, then it starts the same services back up....basically a refresh.  A similar workflow could probably be used crelate a list of services that are using a cache and need to be refreshed.  To stop/start/refresh services remotely, you would have to have remote admin rights to the ArcGIS Server, which you may not what to do if not on the same network (domain).

So I don't have any experiences to share dong exactly what you are trying, however, having a different SOURCE server and TARGET server should not be an issue, assuming you have the administrator or write access you need to the TARGET......or read access to the SOURCE if the tool is being run one the remote/target machine.  

Of of course the best way to find out if it will work is to set up a new, simple test service and run it thru the process. This way you can see if you have the permissions or can add the permissions in a secure way.  No use going thru the full tool creation if you network security doesn't allow it.  At least that is what I would do....to many variables between everyone's servers and networks to answer whether it will work for sure or not.

not sure if any of that is useful or not, but maybe some more things to think about.

View solution in original post

5 Replies
DanPatterson_Retired
MVP Esteemed Contributor

The requirements are fairly specific Import Tile Cache—Help | ArcGIS Desktop 

I presume you haven't tried what you want to do to see if it works.

0 Kudos
RebeccaStrauch__GISP
MVP Esteemed Contributor

I would think this is possible as long as the TARGET is read/write and the SOURCE is at least read and the remote machine is still within a VPN maybe.  Have you tried creating a SHARED connection to the remote drive/folder with the appropriate permissions?

If these are not in the same server, network, or it isn't a machine that you are able to administer remotely, can you give additional details on what software you and your client are using? Are you both using ArcGIS Server and you are just pre-creating the cache and then copying it over?  have you thought about allowing the service to create tiles on demand?

You mention the importing of tiles, but several help topics for creating the tiles might also be of interest...

Manage Tile Cache—Help | ArcGIS Desktop  

or have you looked at Automating cache creation and updates with geoprocessing—Documentation | ArcGIS Enterprise    If you are using Server.

0 Kudos
YOUNG_GONBAEK
New Contributor

Thank you all about my question.

I have two remote ArcGIS Servers that have the same dataset each with oracle database.

I also have three data services which are server tile cache, local time cache(tpk) and dynamic data service(direct connection on the fly).

I have implemented GUI tool for managing local tile data with arypy and wxpython.

I am now planning to add a functionality of generating server tile cache in the GUI tool but I don't know how to generate server tile cache on my desk.

About our managing server tile cache process, we have 44 areas totally to generate tiles which has 22 areas on each machine Periodically .

As I consider Rebecca's answer, let me ask that i can possibly write code below?

If i have one mache with IP address in "server.ip.address", then use following code

arcpy.ImportTileCache_management(

"\\server.ip.address\\Datasets\\Target",

"\\server.ip.address\\Datasets\\Source",

"4000;2000;1000", "#","MERGE")

What will happen then? can i have right server tile cache on "\\server.ip.address\\Datasets\\Target" with source in which also same remote machine in different folder(this time "\\server.ip.address\\Datasets\\Source")?

Can you teach me your personal experience on this question? 

If not possible, are there other methods i have to try?

Thank you in advance again!

0 Kudos
RebeccaStrauch__GISP
MVP Esteemed Contributor

I have not used the ImportTileCache tool, but do create all our caches on a development server, then I just copy the updated tiles over to the production machine and refresh the services.  

Our services are set up using the same data source structure (that is, the local d:\data\<data>) and registered the same, so the mxd can be identical too.  Our area or interest is large, but probably not as varied as yours, so I can typically just copy/replace the cache as needed.  Our servers are within the same network/firewall, so copying is not an issue.

We have a similar workflow for replacing datasets that are used by services.  Because locks can occur that can prevent replacing data sources and refreshing, I have a tool the queries each data source to see if it is being accessed by the service, creates a list and stops these services so the data source can be replaced, then it starts the same services back up....basically a refresh.  A similar workflow could probably be used crelate a list of services that are using a cache and need to be refreshed.  To stop/start/refresh services remotely, you would have to have remote admin rights to the ArcGIS Server, which you may not what to do if not on the same network (domain).

So I don't have any experiences to share dong exactly what you are trying, however, having a different SOURCE server and TARGET server should not be an issue, assuming you have the administrator or write access you need to the TARGET......or read access to the SOURCE if the tool is being run one the remote/target machine.  

Of of course the best way to find out if it will work is to set up a new, simple test service and run it thru the process. This way you can see if you have the permissions or can add the permissions in a secure way.  No use going thru the full tool creation if you network security doesn't allow it.  At least that is what I would do....to many variables between everyone's servers and networks to answer whether it will work for sure or not.

not sure if any of that is useful or not, but maybe some more things to think about.

YOUNG_GONBAEK
New Contributor

I totally understood what you'd said

I think there is no way to generate server tile cache automatically with remote machine especially my desktop pc.

To accomplish this task, I think I do with the process as following..

1. Generate server tile locally.

2. Stop server tile cache service

3. Copy the server tile results and paste to some specific service folder in which the server tile cache service is served on remote ArcGIS server tile system.

4. Start service.

5. Check what i did with the service right results.

Thank you for your concern, Rebecca

0 Kudos