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

Help

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

ConvertLinearUnits

  • サマリー
  • 説明
  • 構文
  • コードのサンプル

サマリー

Converts native data units to linear units such as meters, kilometers, and miles.

説明

This function is useful for converting the native data units to units that are easier to measure. For example, if the data is in decimal degrees, it is easier to identify a minimum distance value in kilometers.

構文

ConvertLinearUnits (length_value, layer)
パラメーター説明データ タイプ
length_value

The number of units and the unit of measure to be used, for example, 1000 meters.

String
layer

The layer whose units will be converted.

Layer

コードのサンプル

ConvertLinearUnits example

This script converts the Facilities features to meters.

import arcpy
import arcpyproduction
from arcpyproduction import generalization

# set environment
arcpy.env.workspace="c:/Data/LocalGovernment.gdb"

# Check out Production Mapping license
arcpy.CheckOutExtension("Foundation")

# Define variables
inFeatures="ReferenceData/FacilitySite"
inFeatLayer="Facilities"

# create a feature layer
arcpy.MakeFeatureLayer_management(inFeatures,inFeatLayer)

# Execute ConvertLinearUnits
value=generalization.ConvertLinearUnits("100 Meters", inFeatLayer)

# describe inFeatLayer to determine its linear units
desc=arcpy.Describe(inFeatLayer)
sr=desc.spatialReference
if sr.linearUnitName != '':
    unit=sr.linearUnitName
    print "Converted meters to {0} {1}".format(value,unit)
else:
    print "Converted meters to {0}".format(value)

関連トピック

  • Introduction to arcpyproduction.generalization
  • ConvertArealUnits

ArcGIS Desktop

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

ArcGIS プラットフォーム

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

Esri について

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