Esri / ArcREST

python package for REST API (AGS, AGOL, webmap JSON, etc..)
Apache License 2.0
192 stars 155 forks source link

rebuilt agol tile cache from a python script #270

Closed ghost closed 7 years ago

ghost commented 8 years ago

ArcRest or ArcRestHelper

Version or date of download

Bug or Enhancement

I have need to automate rebuilding a tile cache periodically

  1. feature service is being updated every five minutes
  2. those features pan best when tiled
  3. i created the tile cache when sharing the service but I need a way to trigger those tiles to be re-generated once that update has overwritten the service the cache was generated from

    Repo Steps or Enhancement details

achapkowski commented 8 years ago

@ibriefer is this AGOL service cache or a map service (hosted on your own server) cache?

ghost commented 8 years ago

agol

I consume data, use arcpy to load it locally into SDE, have a map that goes against that feature class in the database and symbolizes it, and the update.py script updates the agol feature service. But they pan too slowly. I still need access to the feature service for queries (intersect mainly) but also need to keep a tile set up to date.

I am able to create a tile package on the load machine and i was able to manually share that as a map service. I need a way to automate the overwrite of that tile package keeping the service name the same so that maps and especially the iPad app continue working against it (because of the time it takes to get any changes in that through the app store process) .

ghost commented 8 years ago

(actually there will be about 30 tile services done this way if I can get a workflow to do so)

ghost commented 8 years ago

We don't have a server license, we have arcgis advanced plus the ago org account. We do have another couple of tile sets that we create in gdal and then simply server from folders. I haven't found a way in arc map to create an exploded cache. If I could do that, that would probably be usable going with that flow but we're trying to get more of this onto AGOL as our platform (because the set that I did tile performed very well).

What we tile now is to maintain radar and by tiling into folders it's easy to keep the last few tile sets to create the animated radar. And we have no downtime on tiles because at the end of the creation we simply rename the sets of folders and voila the new stuff is instantly serving from the same 'current' radar folder, and so on.

Ideally I'd like to maintain 12 tile caches for radar in the same way. Ie load current then rename the old 'current' and back (dropping the oldest one) and then serving the new one as 'current.; We only cache this for a few view levels (cache set when it's a tpk is 42mb) so it generates pretty quickly.