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
  • マイ プロフィール
  • サイン アウト

ヘルプ

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

マップ サービス キャッシュの格納形式を変換 (Convert Map Server Cache Storage Format)

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

サマリー

マップまたはイメージ サービスの格納されているキャッシュを、エクスプロード形式とコンパクト形式の間で変換します。このツールでは、変換後の形式が変換前と同じ場所に配置されるので、既存の形式のキャッシュのコピーは作成されません。代わりに、同じキャッシュ フォルダーに新しい形式のキャッシュが作成され、古い形式は削除されます。

元の形式に戻す可能性がある場合は、このツールを実行する前にキャッシュのバックアップを作成します。

使用法

    レガシー:
    このツールはバージョン 10.1 で、パラメーターが変更されました。このツールを使用するモデルとスクリプトのうち 10.1 より前に作成されたものは、10.1 で動作するように変更する必要があります。
  • このツールを使用するには、変換対象のキャッシュを使用するマップまたはイメージ サービスを指定します。ツールは現在の格納形式を検出し、その情報を使用して、自動的にターゲットの形式を逆の形式に設定します。[キャッシュ サービスのインスタンス数](Python では num_of_caching_service_instances) パラメーターに値を指定することで、キャッシュ変換に専用で使用するサービス インスタンスの数を選択できます。

構文

ConvertMapServerCacheStorageFormat_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 サービスの [コンピューターごとのインスタンスの最大数] の値を大きく変更することができます。選択したインスタンス数を、サーバー コンピューターでサポートできることを確認してください。

Long

コードのサンプル

ConvertMapServerCacheStorageFormat (マップ サービス キャッシュの格納形式を変換) の例サービスのキャッシュ格納形式を変換します。

# Name: ConvertMapServerCacheStorageFormat.py
# Description: The following stand-alone script demonstrates how to convert map
#               server cache storage format to the alteranate storage format
# 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, string, datetime, traceback

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

# Set local 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')

# One can leave the variable for storage format marked "COMPACT" to "" (default)
# Execute ConvertMapServerCacheFormat
try:
    starttime = time.clock()
    result = arcpy.ConvertMapServerCacheStorageFormat_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 "Converted Map Server Cache Storage format for " + serviceName + " 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 1 \n" "Line %i" % tb.tb_lineno)
    report.write(e.message)
report.close()
    
print "Converted Map Server Cache Storage format "

環境

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

ライセンス情報

  • 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. | プライバシー | リーガル