ArcGIS Desktop

  • ドキュメント
  • サポート

  • My Profile
  • ヘルプ
  • Sign Out
ArcGIS Desktop

ArcGIS Online

組織のマッピング プラットフォーム

ArcGIS Desktop

完全なプロ仕様の GIS

ArcGIS Enterprise

エンタープライズ GIS

ArcGIS for Developers

位置情報利用アプリの開発ツール

ArcGIS Solutions

各種業界向けの無料のテンプレート マップおよびテンプレート アプリケーション

ArcGIS Marketplace

組織で使えるアプリとデータを取得

  • ドキュメント
  • サポート
Esri
  • サイン イン
user
  • マイ プロフィール
  • サイン アウト

ヘルプ

  • ホーム
  • はじめに
  • マップ
  • 解析
  • データ管理
  • ツール
  • その他...

マップ サービス キャッシュの削除 (Delete Map Server Cache)

  • サマリー
  • 使用法
  • 構文
  • コードのサンプル
  • 環境
  • ライセンス情報

サマリー

既存のマップまたはイメージ サービスのキャッシュ (ディスク上のすべての関連ファイルを含む) を削除します。

レガシー:
このツールはバージョン 10.1 で、パラメーターが変更されました。このツールを使用するモデルとスクリプトのうち 10.1 より前に作成されたものは、10.1 で動作するように変更する必要があります。

使用法

  • これは回復不能な操作のため、そのキャッシュが確実に不要な場合にのみ使用してください。タイルだけを削除してキャッシュのフォルダー構造とタイル スキーマを残す場合は、[マップ サービス キャッシュのタイルを管理 (Manage Map Server Cache Tiles)] ツールを、[更新方法] を [Delete Tiles] に設定して使用します。

  • ツールを実行した後、サービスが再起動します。

構文

DeleteMapServerCache_server (input_service, {num_of_caching_service_instances})
パラメーター説明データ タイプ
input_service

キャッシュを削除するマップまたはイメージ サービス。

これは、サーバーとサービスの両方の情報を含む文字列です。この文字列の構築方法を確認するには、ArcCatalog を開き、カタログ ツリーでサービスを選択して、[場所] ツールバーに表示されているテキストを記録します。バックスラッシュをスラッシュに変更します (たとえば、GIS Servers/arcgis on MYSERVER (admin)/USA.MapServer)。

String
num_of_caching_service_instances
(オプション)

このツールの実行に専用で使用する、システム/CachingTools サービスのインスタンス数の合計。ArcGIS Server への管理者接続を通して使用できる [サービス エディター] ウィンドウで、システム/CachingTools サービスの [コンピューターごとのインスタンスの最大数] の値を大きく変更することができます。選択したインスタンス数を、サーバー コンピューターでサポートできることを確認してください。

[マップ サービス キャッシュの削除 (Delete Map Server Cache)] ツールを正常に実行するには、少なくとも 2 つのインスタンスが必要です。

Long

コードのサンプル

DeleteMapServerCache (マップ サービス キャッシュの削除) の例この例では、DeleteMapServerCache を使用して、Rainfall という名のマップ サービス用のキャッシュを削除します。

# Name: DeleteMapServerCache.py
# Description: The following stand-alone script demonstrates how to delete map server cache
#              tiles if the corresponding cache schema or tiles has been created
# Requirements: os, sys, time & traceback modules

# Any line that begins with a pound sign is a comment and will not be executed
# Empty quotes take the default value.
# To accept arguments from the command line replace values of variables to
#                                                           "sys.argv[]"

# Import system modules
import arcpy
from arcpy import env
import os, sys, time, datetime, traceback, string

# Set environment settings
env.workspace = "C:/data"

# List of variables for mapservice properties
connectionFile = r"C:\Users\<username>\AppData\Roaming\ESRI\Desktop10.1\ArcCatalog"
server = "arcgis on MyServer_6080 (publisher)"
serviceName = "Rainfall.MapServer"
inputService = connectionFile + "\\" + server + "\\" + serviceName
numOfCachingServiceInstances = 2


currentTime = datetime.datetime.now()
arg1 = currentTime.strftime("%H-%M")
arg2 = currentTime.strftime("%Y-%m-%d %H:%M")
file = 'C:/data/report_%s.txt' % arg1

# print results of the script to a report
report = open (file,'w')

# To Recreate all the tiles for the default number of scales generated
try:
    starttime = time.clock()
    result = arcpy.DeleteMapServerCache_server(inputService,
                                               numOfCachingServiceInstances)
    finishtime = time.clock()
    elapsedtime = finishtime - starttime

    #print messages to a file
    while result.status < 4:
        time.sleep(0.2)
    resultValue = result.getMessages()
    report.write ("completed " + str(resultValue))

    print "Deleted cache tiles & schema for mapservice " + serviceName
    "\n  in " + str(elapsedtime) + " sec \n on " + arg2
    
except Exception, e:
    # If an error occurred, print line number and error message
    tb = sys.exc_info()[2]
    report.write("Failed at \n" "Line %i" % tb.tb_lineno)
    report.write(e.message)


print "Deleted Map server Cache Tiles "

report.close()

環境

このツールはジオプロセシング環境を使用していません

ライセンス情報

  • ArcGIS Desktop Basic: はい
  • ArcGIS Desktop Standard: はい
  • ArcGIS Desktop Advanced: はい

関連トピック

  • キャッシュ ツールセットの概要

ArcGIS Desktop

  • ホーム
  • ドキュメント
  • サポート

ArcGIS プラットフォーム

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

Esri について

  • 会社概要
  • 採用情報
  • スタッフ ブログ
  • ユーザ カンファレンス
  • デベロッパ サミット
Esri
ご意見・ご感想をお寄せください。
© Copyright 2016 Environmental Systems Research Institute, Inc. | プライバシー | リーガル