ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

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

ArcGIS Online

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

ArcGIS Desktop

完全なプロ仕様の GIS

ArcGIS Enterprise

エンタープライズ GIS

ArcGIS Developers

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

ArcGIS Solutions

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

ArcGIS Marketplace

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

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

ArcMap

  • ホーム
  • はじめに
  • マップ
  • 解析
  • データ管理
  • ツール
  • エクステンション

マップ サービス キャッシュ ステータスの管理 (Manage Map Server Cache Status)

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

概要

サーバーで保持されている、マップまたはイメージ サービス キャッシュ内の構築済みタイルに関する内部データを管理します。

使用法

  • このツールは、ArcMap または ArcGIS Server でレポートされたキャッシュの終了ステータス情報を削除または再作成できます。

  • このツールは、タイルを手動でキャッシュ ディレクトリにコピーする場合や、オンデマンドでタイルを作成した後にキャッシュのステータスを再作成する場合に役立ちます。

  • このツールは、以前のバージョンの ArcGIS Server または Portal for ArcGIS で作成されたキャッシュのステータスを作成する唯一の手段です。

  • キャッシュ全体のステータスを作成する代わりに、このツールを使用して、カスタムの対象地域と縮尺レベルのステータス レポートを作成できます。これは、[管理モード] パラメーター (Python では manage_mode) を REPORT_BUNDLE_STATUS に設定することによって行います。このレポートは、Status.gdb という名前の新しいファイル ジオデータベース (具体的には、TaskStatus という名前のフィーチャクラス内) に保存されます。

    また、キャッシュ ディレクトリにも、キャッシュ全体に関連する Status.gdb が格納され、このツールの他の [管理モード] オプションを使用すると更新されます。この場所で、カスタムの Status.gdb を代用することはできません。

構文

arcpy.server.ManageMapServerCacheStatus(input_service, manage_mode, {scales}, {num_of_caching_service_instances}, {report_folder}, {area_of_interest}, {report_extent})
パラメーター説明データ タイプ
input_service

ステータスを変更するマップまたはイメージ サービス。

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

Image Service; MapServer
manage_mode
  • DELETE_CACHE_STATUS —サーバーが使用するステータス情報を削除します。
  • REBUILD_CACHE_STATUS —サーバーが使用するステータス情報を削除してから、再作成します。
  • REPORT_BUNDLE_STATUS —[出力フォルダー] パラメーターで指定したフォルダー内の Status.gdb という名前の新しいファイル ジオデータベースに、ステータス情報を作成します。このオプションは、特定の対象地域または一連の縮尺のカスタム ステータス レポートを作成する場合に使用します。
String
scales
[scales,...]
(オプション)

ステータスの縮尺レベルは変更されます。このパラメーターは、REPORT_BUNDLE_STATUS パラメーターの manage_mode オプションを使用してカスタム ステータスを作成する場合にのみ適用できます。

Double
num_of_caching_service_instances
(オプション)

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

このツールは、多数のインスタンスを使用できる場合、デフォルトで 3 つのインスタンスを使用します。このツールで多数のインスタンスを使用すると、動作速度が低下する場合があります。

Long
report_folder
(オプション)

Status.gdb の出力フォルダー。このパラメーターは、REPORT_BUNDLE_STATUS オプションを使用してカスタム ステータスを作成する場合にのみ適用できます。

Folder
area_of_interest
(オプション)

ステータス レポートの対象となる範囲を決定する対象地域 (ポリゴン)。このパラメーターは、REPORT_BUNDLE_STATUS オプションを使用してカスタム ステータスを作成する場合にのみ適用できます。

Feature Set
report_extent
(オプション)

ステータスを作成する領域を定義する矩形範囲。このパラメーターは、REPORT_BUNDLE_STATUS オプションを使用してカスタム ステータスを作成する場合にのみ適用できます。

なお、area_of_interest パラメーターを使用して、矩形以外の対象地域を指定できます。

Extent

派生した出力

名前説明データ タイプ
output_folder

出力 サービス URL。

String

コードのサンプル

ManageMapServerCacheStatus (マップ サービス キャッシュ ステータスの管理) の例 (スタンドアロン スクリプト)

キャッシュのステータス情報を削除します。

# Name: ManageMapServerCacheStatus.py
# Description: The following stand-alone script demonstrates how to delete 
# status of cache using ManageMapServerCachStatus tool  

# Requirements: os, sys, time and 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 input variables for map service properties
connectionFile = r"C:\Users\<username>\AppData\Roaming\ESRI\Desktop10.1\ArcCatalog"
server = "arcgis on MyServer_6080 (publisher)"
serviceName = "Rainfall.MapService"
inputService = connectionFile + "\\" + server + "\\" + serviceName
scales = ""
manageMode = "DELETE_CACHE_STATUS"
numOfCachingServiceInstances = "2"
outputFolder = ""
areaOfInterest = ""
reportExtents = ""


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')

# use "scales[0]","scales[-1]","scales[0:3]"

try:
    starttime = time.clock()
    result = arcpy.ManageMapServerCacheStatus_server(inputService, 
                                                     manageMode, scales,
                                                     numOfCachingServiceInstances,
                                                     outputFolder,
                                                     areaOfInterest, 
                                                     reportExtents)                                           
    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 "Reported the Bundle status for scale =" + str(scales[-1]) + "of " +\
    serviceName + "at " + outputFolder + "\n using specified feature class " +\
    areaOfInterest + " 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 step 3 \n" "Line %i" % tb.tb_lineno)
    report.write(e.message)

report.close()

環境

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

ライセンス情報

  • Basic: はい
  • Standard: はい
  • Advanced: はい

ArcGIS Desktop

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

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

Esri について

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