ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Справка
  • Sign Out
ArcGIS Desktop

ArcGIS Online

Картографическая платформа вашей организации

ArcGIS Desktop

Полноценная профессиональная ГИС

ArcGIS Enterprise

ГИС предприятия

ArcGIS Developers

Инструменты для встраивания приложений с местоположениями

ArcGIS Solutions

Бесплатные шаблоны карт и приложений для отрасли

ArcGIS Marketplace

Получение приложения и данных для вашей организации.

  • Документация
  • Поддержка
Esri
  • Войти
user
  • Мой профиль
  • Выход

ArcMap

  • На главную
  • Начало работы
  • Карта
  • Анализ
  • Управление данными
  • Инструменты
  • Дополнительные модули

Convert M-Value Units Of Measure

  • Сводка
  • Использование
  • Синтаксис
  • Пример кода
  • Параметры среды
  • Информация о лицензиях

Сводка

Converts the measure m-values of a dataset from one unit to another. The m-values of the input dataset are modified upon executing this tool.

Использование

  • This tool is used for the HPMS 2012 models.

    Примечание:

    Any uncalibrated routes in the network receive an m-value of zero (0) after executing this tool; therefore, you should calibrate all the routes in the network before running this tool.

    Learn more about route calibration

Синтаксис

arcpy.locref.ConvertMValueUnitsOfMeasure(in_network, in_source_unit_of_measure, in_target_unit_of_measure, in_precision)
ПараметрОбъяснениеТип данных
in_network

The source network feature.

Feature Layer
in_source_unit_of_measure

The unit of measure of the source network layer.

String
in_target_unit_of_measure

The unit of measure to which the source network layer values will convert.

String
in_precision

The number of decimals for the target units.

Long

Пример кода

ConvertMValueUnitsOfMeasure example 1 (Python window)

The following script demonstrates how to use the ConvertMValueUnitsOfMeasure function in immediate mode.

# Name: ConvertM-ValueUnitsOfMeasure_arcmap.py
# Description: Converts the measure (m) values of a dataset from one unit to another. The m-values of the input dataset are modified upon executing this tool.

# Import arcpy module
import arcpy

# tool variables
in_network = "network_lyr"
in_source_unit_of_measure = "feet"
in_target_unit_of_measure = "miles"
in_precision = "3"

# set current workspace
arcpy.env.workspace="C:/Data/NY_Data.gdb/LRSN_MilePoint"

# execute the tool
arcpy.ConvertMValueUnitsOfMeasure_locref(in_network, in_source_unit_of_measure, in_target_unit_of_measure, in_precision)
ConvertMValueUnitsOfMeasure example 2 (stand-alone script)

The following script demonstrates how to use ConvertMValueUnitsOfMeasure in a stand-alone Python script.

# Name: ConvertM-ValueUnitsOfMeasure.py
# Description: Converts the measure (m) values of a dataset from one unit to another. The m-values of the input dataset are modified upon executing this tool.

# Import arcpy module
import arcpy

# Check out any necessary licenses
arcpy.CheckOutExtension("Highways")

# Local variables:
network = r"C:/Data/NY_Data.gdb/LRSN_MilePoint"

# Make a feature layer for network
arcpy.MakeFeatureLayer_management(network, "network_lyr")

# Process: Convert M-value Units Of Measure
arcpy.ConvertMValueUnitsOfMeasure_locref("network_lyr", "Feet", "Miles", "3")

Параметры среды

Этот инструмент не использует параметры среды геообработки

Информация о лицензиях

  • Basic: Требуется Roads and Highways
  • Standard: Требуется Roads and Highways
  • Advanced: Требуется Roads and Highways

Связанные разделы

  • An overview of the Location Referencing toolbox

ArcGIS Desktop

  • На главную
  • Документация
  • Поддержка

ArcGIS

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

Об Esri

  • О нас
  • Карьера
  • Блог Esri
  • Конференция пользователей
  • Саммит разработчиков
Esri
Расскажите нам, что вы думаете.
Copyright © 2021 Esri. | Конфиденциальность | Правовая информация