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

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

NumPyArrayToFeatureClass

  • 概要
  • ディスカッション
  • 構文
  • コードのサンプル

概要

NumPy 構造化配列をポイント フィーチャクラスに変換します。

ディスカッション

入力配列のフィールド名が出力形式で無効である場合、整合チェックされます。 入力フィールド名のすべての無効な文字は、出力フィールド名では下線 (_) に置き換えられます。 フィールド名の制限は、使用されるデータベースによって異なります。

NumPyArrayToFeatureClass は、overwriteOutput 環境が True に設定されていても、既存のフィーチャクラスを上書きしません。

NumPy is a fundamental package for scientific computing in Python, including support for a powerful N-dimensional array object. For more information, see Working with NumPy in ArcGIS.

構文

NumPyArrayToFeatureClass (in_array, out_table, shape_fields, {spatial_reference})
パラメーター説明データ タイプ
in_array

NumPy 構造化配列。

配列には、フィールド名と NumPy dtype が含まれている必要があります。

NumPyArray
out_table

The output point feature class to which the records from the NumPy array will be written.

String
shape_fields
[shape_fields,...]

A list (or tuple) of field names used to create the feature class' geometry. Coordinates are specified in the order of x, y, z, and m. z-coordinate and m-value fields are optional.

Assuming field names of x, y, z, and m in a numpy array, feature classes could be constructed as below.

import arcpy

# Create a feature class with x,y fields
arcpy.da.NumPyArrayToFeatureClass(array, fc, ("x", "y"))

# Create a feature class with x,y,z fields
arcpy.da.NumPyArrayToFeatureClass(array, fc, ("x", "y", "z"))

# Create a feature class with x,y,m fields
arcpy.da.NumPyArrayToFeatureClass(array, fc, ("x", "y", "", "m"))

# Create a feature class with x,y,z,m fields
arcpy.da.NumPyArrayToFeatureClass(array, fc, ("x", "y", "z", "m"))
String
spatial_reference

フィーチャクラスの空間参照。 これは、SpatialReference オブジェクトまたは同等の文字列を使用して指定できます。

(デフォルト値は次のとおりです None)

SpatialReference

コードのサンプル

import arcpy
import numpy

outFC = "C:/data/texas.gdb/fd/pointlocations"

# Create a numpy array with an id field, and a field with a tuple 
#  of x,y coordinates
#
array = numpy.array([(1, (471316.3835861763, 5000448.782036674)),
                     (2, (470402.49348005146, 5000049.216449278))],
                    numpy.dtype([('idfield',numpy.int32),('XY', '<f8', 2)]))

# Define a spatial reference for the output feature class
#
SR = arcpy.Describe("C:/data/texas.gdb/fd").spatialReference

# Export the numpy array to a feature class using the XY field to
#  represent the output point feature
#
arcpy.da.NumPyArrayToFeatureClass(array, outFC, ['XY'], SR)

関連トピック

  • NumPyArrayToTable
  • FeatureClassToNumPyArray
  • TableToNumPyArray
  • ArcGIS での NumPy の操作
  • ExtendTable

ArcGIS Desktop

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

ArcGIS

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

Esri について

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