ArcGIS for Desktop

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

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

ArcGIS Online

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

ArcGIS for Desktop

完全なプロ仕様の GIS

ArcGIS for Server

エンタープライズ GIS

ArcGIS for Developers

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

ArcGIS Solutions

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

ArcGIS Marketplace

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

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

ヘルプ

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

クローズド マルチパッチの作成 (Enclose Multipatch)

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

サマリ

入力マルチパッチのフィーチャを使用して、出力フィーチャクラスとしてクローズド マルチパッチ フィーチャを作成します。

使用法

  • このツールは、閉じるように設計されているが、地理的なギャップにより閉じていないマルチパッチ フィーチャ (建物など) に使用します。

  • すべてのマルチパッチ フィーチャが評価され、閉じているかどうかが判定されます。すでに閉じているフィーチャは、出力マルチパッチにコピーされます。

  • [クローズド 3D (Is Closed 3D)] ツールを使用すると、マルチパッチ フィーチャクラスが閉じていないフィーチャを含むかどうかを判定できます。

  • このツールは、3D フィーチャの解析機能を備えた 3D セット演算子です。セット演算子の種類と、その使用方法については、「3D セット演算子の使用」をご参照ください。

構文

EncloseMultipatch_3d (in_features, out_feature_class, {grid_size})
パラメータ説明データ タイプ
in_features

クローズド マルチパッチの生成に使用するマルチパッチ フィーチャ。

Feature Layer
out_feature_class

出力されるクローズド マルチパッチ フィーチャ。

Feature Class
grid_size
(オプション)

クローズド マルチパッチ フィーチャを生成するときの解像度。この値は入力フィーチャの空間参照の距離単位を使用して定義されます。

Double

コードのサンプル

EncloseMultipatch (クローズド マルチパッチの作成) の例 1 (Python ウィンドウ)

次のサンプルは、Python ウィンドウでこのツールを使用する方法を示しています。

import arcpy
from arcpy import env

arcpy.CheckOutExtension('3D')
env.workspace = 'C:/data'
arcpy.EncloseMultiPatch_3d('unclosed_features.shp', 
                          'enclosed_features.shp', 0.5)
EncloseMultipatch (クローズド マルチパッチの作成) の例 2 (スタンドアロン スクリプト)

次のサンプルは、スタンドアロン Python スクリプトでこのツールを使用する方法を示しています。

'''*********************************************************************
Name: Model Shadows For GeoVRML Models
Description: Creates a model of the shadows cast by GeoVRML models 
             imported to a multipatch feature class for a range of dates
             and times. A range of times from the start time and end 
             time can also be specified by setting the EnforceTimes 
             Boolean to True. This sample is designed to be used in a 
             script tool.
*********************************************************************'''
# Import system modules
import arcpy
from datetime import datetime, time, timedelta

#*************************  Script Variables  **************************
inFiles = arcpy.GetParameterAsText(0) # list of input features
spatialRef = arcpy.GetParameterAsText(1) # list of GeoVRML files
outFC = arcpy.GetParameterAsText(2) # multipatch from 3D files
inTimeZone = arcpy.GetParameterAsText(3) # time zone
startDate = arcpy.GetParameter(4) # starting date as datetime
endDate = arcpy.GetParameter(5) # ending date as datetime
dayInterval = arcpy.GetParameter(6) # day interval as long (0-365)
minInterval = arcpy.GetParameter(7) # minute interval as long (0-60)
enforceTime = arcpy.GetParameter(8) # minute interval as Boolean
outShadows = arcpy.GetParameterAsText(9) # output shadow models
outIntersection = arcpy.GetParameterAsText(10) # shadow & bldg intersection

# Function to find all possible date/time intervals for shadow modelling
def time_list():
    dt_result = [startDate]
    if dayInterval:
        if endDate: #Defines behavior when end date is supplied
            while startDate < endDate:
                startDate += timedelta(days=dayInterval)
                dt_result.append(startDate)
            dt_result.append(endDate)
        else: # Behavior when end date is not given
            daymonthyear = datetime.date(startDate)
            while startDate <= datetime(daymonthyear.year, 12, 31, 23, 59):
                startDate += timedelta(days=dayInterval)
                dt_result.append(startDate)
    return dt_result

try:
    arcpy.CheckOutExtension('3D')
    importFC = arcpy.CreateUniqueName('geovrml_import', 'in_memory')
    # Import GeoVRML files to in-memory feature
    arcpy.ddd.Import3DFiles(inFiles, importFC, 'ONE_FILE_ONE_FEATURE', 
                            spatialRef, 'Z_IS_UP', 'wrl')
    # Ensure that building models are closed
    arcpy.ddd.EncloseMultiPatch(importFC, outFC, 0.05)
    # Discard in-memory feature
    arcpy.management.Delete(importFC)
    dt_result = time_list()
    for dt in dt_result:
        if dt == dt_result[0]:
            shadows = outShadows
        else:
            shadows = arcpy.CreateUniqueName('shadow', 'in_memory')
        arcpy.ddd.SunShadowVolume(outFC, dt, shadows, 'ADJUST_FOR_DST', 
                                  inTimeZone, '', minInterval, 'MINUTES')
        if dt is not dt_result[0]:
            arcpy.management.Append(shadows, outShadows)
            arcpy.management.Delete(shadows)
    arcpy.ddd.Intersect3D(outFC, outIntersection, outShadows, 'SOLID')
    arcpy.CheckInExtension('3D')
except arcpy.ExecuteError:
    print arcpy.GetMessages()
except:
    # Get the traceback object
    tb = sys.exc_info()[2]
    tbinfo = traceback.format_tb(tb)[0]
    # Concatenate error information into message string
    pymsg = "PYTHON ERRORS:\nTraceback info:\n{0}\nError Info:\n{1}"\
          .format(tbinfo, str(sys.exc_info()[1]))
    msgs = "ArcPy ERRORS:\n {0}\n".format(arcpy.GetMessages(2))
    # Return python error messages for script tool or Python Window
    arcpy.AddError(pymsg)
    arcpy.AddError(msgs)

環境

  • 現在のワークスペース
  • 範囲
  • 出力データの座標系
  • 地理座標系変換
  • 出力データのコンフィグレーション キーワード
  • 自動コミット
  • 出力データの XY ドメイン
  • 出力データの Z ドメイン

ライセンス情報

  • ArcGIS for Desktop Basic: 次のものが必要 3D Analyst
  • ArcGIS for Desktop Standard: 次のものが必要 3D Analyst
  • ArcGIS for Desktop Advanced: 次のものが必要 3D Analyst

関連トピック

  • 3D フィーチャ ツールセットの概要
  • 3D フィーチャについて
  • ArcGIS 3D Analyst エクステンションのジオプロセシングの基礎
  • 3D セット演算子の使用
  • 既存の 3D モデルをマルチパッチ フィーチャクラスへインポートする手順
  • マルチパッチ
このトピックへのフィードバック

ArcGIS for Desktop

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

ArcGIS プラットフォーム

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

Esri について

  • 会社概要
  • 採用情報
  • スタッフ ブログ
  • ユーザ カンファレンス
  • デベロッパ サミット
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | プライバシー | リーガル